Class: VericredClient::ProvidersApi
- Inherits:
-
Object
- Object
- VericredClient::ProvidersApi
- Defined in:
- lib/vericred_client/api/providers_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_provider(npi, opts = {}) ⇒ nil
Delete an NPI from a provider.
-
#delete_provider_with_http_info(npi, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete an NPI from a provider.
-
#get_provider_plans(npi, line_of_coverage, year, opts = {}) ⇒ ProviderPlans
Provider Plans Retrieve the plans a provider accepts.
-
#get_provider_plans_with_http_info(npi, line_of_coverage, year, opts = {}) ⇒ Array<(ProviderPlans, Fixnum, Hash)>
Provider Plans Retrieve the plans a provider accepts.
-
#get_providers(body, opts = {}) ⇒ ProvidersSearchResponse
Find Providers ### Provider Details All searches can take a ‘search_term`, which is used as a component in the score (and thus the ranking/order) of the results.
-
#get_providers_with_http_info(body, opts = {}) ⇒ Array<(ProvidersSearchResponse, Fixnum, Hash)>
Find Providers ### Provider Details All searches can take a `search_term`, which is used as a component in the score (and thus the ranking/order) of the results.
-
#initialize(api_client = ApiClient.default) ⇒ ProvidersApi
constructor
A new instance of ProvidersApi.
-
#put_provider(npi, body, opts = {}) ⇒ nil
Find a Provider Add a new provider to the database.
-
#put_provider_with_http_info(npi, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Find a Provider Add a new provider to the database.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ProvidersApi
Returns a new instance of ProvidersApi.
1018 1019 1020 |
# File 'lib/vericred_client/api/providers_api.rb', line 1018 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
1016 1017 1018 |
# File 'lib/vericred_client/api/providers_api.rb', line 1016 def api_client @api_client end |
Instance Method Details
#delete_provider(npi, opts = {}) ⇒ nil
Delete an NPI from a provider. Delete a provider to the database.
1027 1028 1029 1030 |
# File 'lib/vericred_client/api/providers_api.rb', line 1027 def delete_provider(npi, opts = {}) delete_provider_with_http_info(npi, opts) return nil end |
#delete_provider_with_http_info(npi, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete an NPI from a provider. Delete a provider to the database.
1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 |
# File 'lib/vericred_client/api/providers_api.rb', line 1037 def delete_provider_with_http_info(npi, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ProvidersApi.delete_provider ..." end # verify the required parameter 'npi' is set fail ArgumentError, "Missing the required parameter 'npi' when calling ProvidersApi.delete_provider" if npi.nil? # resource path local_var_path = "/providers/{npi}".sub('{format}','json').sub('{' + 'npi' + '}', npi.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Vericred-Api-Key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProvidersApi#delete_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_provider_plans(npi, line_of_coverage, year, opts = {}) ⇒ ProviderPlans
Provider Plans Retrieve the plans a provider accepts. **New Verison:** In order to use this endpoint, please set your version header to ‘v7`. If you are using previous versions and want to get the list of `plan_ids` that a provider accepts, you can use the `hios_ids` key in the Provider Show `GET /providers/:npi` endpoint. #### External Id Types Plan `external_ids` are returned as a list, with each item containing both a `type` and a `value`. Below is a list of possible types: | Type | Description | | ————– | —————————————————————————————————————————————————- | | hios_id | The HIOS ID of the plan. This type will be returned for under-65 ACA medical plans. | | contract_id | A contract identifier for the plan. This will be returned for all Medicare Advantage plans and any other plan that contains external contract ids. | | package_code | A package code for the plan. This value will be returned if there is a package in which the plan is bundled. |
1086 1087 1088 1089 |
# File 'lib/vericred_client/api/providers_api.rb', line 1086 def get_provider_plans(npi, line_of_coverage, year, opts = {}) data, _status_code, _headers = get_provider_plans_with_http_info(npi, line_of_coverage, year, opts) return data end |
#get_provider_plans_with_http_info(npi, line_of_coverage, year, opts = {}) ⇒ Array<(ProviderPlans, Fixnum, Hash)>
Provider Plans Retrieve the plans a provider accepts. **New Verison:** In order to use this endpoint, please set your version header to `v7`. If you are using previous versions and want to get the list of `plan_ids` that a provider accepts, you can use the `hios_ids` key in the Provider Show `GET /providers/:npi` endpoint. #### External Id Types Plan `external_ids` are returned as a list, with each item containing both a `type` and a `value`. Below is a list of possible types: | Type | Description | | ————– | —————————————————————————————————————————————————- | | hios_id | The HIOS ID of the plan. This type will be returned for under-65 ACA medical plans. | | contract_id | A contract identifier for the plan. This will be returned for all Medicare Advantage plans and any other plan that contains external contract ids. | | package_code | A package code for the plan. This value will be returned if there is a package in which the plan is bundled. |
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 |
# File 'lib/vericred_client/api/providers_api.rb', line 1099 def get_provider_plans_with_http_info(npi, line_of_coverage, year, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ProvidersApi.get_provider_plans ..." end # verify the required parameter 'npi' is set fail ArgumentError, "Missing the required parameter 'npi' when calling ProvidersApi.get_provider_plans" if npi.nil? # verify the required parameter 'line_of_coverage' is set fail ArgumentError, "Missing the required parameter 'line_of_coverage' when calling ProvidersApi.get_provider_plans" if line_of_coverage.nil? # verify the required parameter 'year' is set fail ArgumentError, "Missing the required parameter 'year' when calling ProvidersApi.get_provider_plans" if year.nil? # resource path local_var_path = "/providers/{npi}/plans".sub('{format}','json').sub('{' + 'npi' + '}', npi.to_s) # query parameters query_params = {} query_params[:'line_of_coverage'] = line_of_coverage query_params[:'year'] = year query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Vericred-Api-Key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ProviderPlans') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProvidersApi#get_provider_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_providers(body, opts = {}) ⇒ ProvidersSearchResponse
Find Providers ### Provider Details All searches can take a ‘search_term`, which is used as a component in the score (and thus the ranking/order) of the results. This is combined with the proximity to the location in ranking results. For example, we would want "Dr. John Smith" who is 5 miles away from a given Zip Code to appear before "Dr. John Smith" who is 100 miles away. The weighting also allows for non-exact matches. In our prior example, we would want "Dr. Jon Smith" who is 2 miles away to appear before the exact match "Dr. John Smith" who is 100 miles away because it is more likely that the user just entered an incorrect name. The free text search also supports Specialty name search and "body part" Specialty name search. So, searching "John Smith nose" would return "Dr. John Smith", the ENT Specialist before "Dr. John Smith" the Internist. In addition, we can filter `Providers` by whether or not they accept any insurance. Our data set includes over 4 million `Providers`, some of whom do not accept any insurance at all. This filter makes it more likely that the user will find his or her practitioner in some cases. ### Location Information All `Provider` searches that do not specify `plan_ids` or `network_ids`require some type of location information. We use this information either to weight results or to filter results, depending on the type. #### Network IDs This endpoint supports filtering provider search results to only those that are in-network for specific provider networks. To do so, you can provide a `network_ids` key in the request that includes a list of the identifiers for each network to filter on. Please note that the `network_ids` response key will only appear if it is used in the request. The use of this filter is reserved for paying customers. #### Zip Code When providing the `zip_code` parameter, we order the `Providers` returned based on their score, which incorporates their proximity to the given Zip Code and the closeness of match to the search text. If a `radius` is also provided, we filter out `Providers` who are outside of that radius from the center of the Zip Code provided. #### Polygon When providing the `polygon` parameter, we filter providers who are outside the bounds of the shape provided. This is mutually exclusive with `zip_code` and `radius`. ### Specialty When providing the `specialty_ids` parameter, we filter providers to those who practice those specialties. To find the specialty_ids, please use the [Specialty Search](#specialtes-specialtes-get) endpoint. ### Plan/Network Information We can also filter based on `Plan` and `Network` participation, using `plan_ids` and `network_ids`, respectively. These filters are mutually exclusive and return the union of the resulting sets for each `Plan` or `Network`. I.e. if you provider Plan A and Plan B, you will receive `Providers` who accept either `Plan`. The same is true for `Networks`. The plan identifiers filter supports: Vericred plan IDs returned from the [Dental](#header-dental-quotes) and [Vision](#header-vision-quotes) endpoints, as well as, HIOS IDs and Medicare contract codes. ### Examples *Find Dr. Foo near Brooklyn* `{ "search_term": "Foo", "zip_code": "11215" }` *Find all Providers within 5 miles of Brooklyn who accept a Plan* `{ "zip_code": "11215", "radius": 5, "plan_ids": ["88582NY0230001"] }` *Find all providers on a map of Brooklyn ordered by a combination of proximity to the center point of the map and relevance to the search term "ENT"* “` { "polygon": [ {"lon":-74.0126609802,"lat":40.6275684851 }, {"lon":-74.0126609802,"lat":40.7097269508 }, {"lon":-73.9367866516,"lat":40.7097269508 }, {"lon":-73.9367866516,"lat":40.6275684851 } ], "search_term" : "ENT" } “`
1153 1154 1155 1156 |
# File 'lib/vericred_client/api/providers_api.rb', line 1153 def get_providers(body, opts = {}) data, _status_code, _headers = get_providers_with_http_info(body, opts) return data end |
#get_providers_with_http_info(body, opts = {}) ⇒ Array<(ProvidersSearchResponse, Fixnum, Hash)>
Find Providers ### Provider Details All searches can take a `search_term`, which is used as a component in the score (and thus the ranking/order) of the results. This is combined with the proximity to the location in ranking results. For example, we would want "Dr. John Smith" who is 5 miles away from a given Zip Code to appear before "Dr. John Smith" who is 100 miles away. The weighting also allows for non-exact matches. In our prior example, we would want "Dr. Jon Smith" who is 2 miles away to appear before the exact match "Dr. John Smith" who is 100 miles away because it is more likely that the user just entered an incorrect name. The free text search also supports Specialty name search and "body part" Specialty name search. So, searching "John Smith nose" would return "Dr. John Smith", the ENT Specialist before "Dr. John Smith" the Internist. In addition, we can filter `Providers` by whether or not they accept any insurance. Our data set includes over 4 million `Providers`, some of whom do not accept any insurance at all. This filter makes it more likely that the user will find his or her practitioner in some cases. ### Location Information All `Provider` searches that do not specify `plan_ids` or `network_ids`require some type of location information. We use this information either to weight results or to filter results, depending on the type. #### Network IDs This endpoint supports filtering provider search results to only those that are in-network for specific provider networks. To do so, you can provide a `network_ids` key in the request that includes a list of the identifiers for each network to filter on. Please note that the `network_ids` response key will only appear if it is used in the request. The use of this filter is reserved for paying customers. #### Zip Code When providing the `zip_code` parameter, we order the `Providers` returned based on their score, which incorporates their proximity to the given Zip Code and the closeness of match to the search text. If a `radius` is also provided, we filter out `Providers` who are outside of that radius from the center of the Zip Code provided. #### Polygon When providing the `polygon` parameter, we filter providers who are outside the bounds of the shape provided. This is mutually exclusive with `zip_code` and `radius`. ### Specialty When providing the `specialty_ids` parameter, we filter providers to those who practice those specialties. To find the specialty_ids, please use the [Specialty Search](#specialtes-specialtes-get) endpoint. ### Plan/Network Information We can also filter based on `Plan` and `Network` participation, using `plan_ids` and `network_ids`, respectively. These filters are mutually exclusive and return the union of the resulting sets for each `Plan` or `Network`. I.e. if you provider Plan A and Plan B, you will receive `Providers` who accept either `Plan`. The same is true for `Networks`. The plan identifiers filter supports: Vericred plan IDs returned from the [Dental](#header-dental-quotes) and [Vision](#header-vision-quotes) endpoints, as well as, HIOS IDs and Medicare contract codes. ### Examples *Find Dr. Foo near Brooklyn* `{ "search_term": "Foo", "zip_code": "11215" }` *Find all Providers within 5 miles of Brooklyn who accept a Plan* `{ "zip_code": "11215", "radius": 5, "plan_ids": ["88582NY0230001"] }` *Find all providers on a map of Brooklyn ordered by a combination of proximity to the center point of the map and relevance to the search term "ENT"* ``` { "polygon": [ {"lon":-74.0126609802,"lat":40.6275684851 }, {"lon":-74.0126609802,"lat":40.7097269508 }, {"lon":-73.9367866516,"lat":40.7097269508 }, {"lon":-73.9367866516,"lat":40.6275684851 } ], "search_term" : "ENT" } ```
1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 |
# File 'lib/vericred_client/api/providers_api.rb', line 1163 def get_providers_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ProvidersApi.get_providers ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ProvidersApi.get_providers" if body.nil? # resource path local_var_path = "/providers/search".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['Vericred-Api-Key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ProvidersSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProvidersApi#get_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_provider(npi, body, opts = {}) ⇒ nil
Find a Provider Add a new provider to the database.
1211 1212 1213 1214 |
# File 'lib/vericred_client/api/providers_api.rb', line 1211 def put_provider(npi, body, opts = {}) put_provider_with_http_info(npi, body, opts) return nil end |
#put_provider_with_http_info(npi, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Find a Provider Add a new provider to the database.
1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 |
# File 'lib/vericred_client/api/providers_api.rb', line 1222 def put_provider_with_http_info(npi, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ProvidersApi.put_provider ..." end # verify the required parameter 'npi' is set fail ArgumentError, "Missing the required parameter 'npi' when calling ProvidersApi.put_provider" if npi.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ProvidersApi.put_provider" if body.nil? # resource path local_var_path = "/providers/{npi}".sub('{format}','json').sub('{' + 'npi' + '}', npi.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['Vericred-Api-Key'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProvidersApi#put_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |