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.
990 991 992 |
# File 'lib/vericred_client/api/providers_api.rb', line 990 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
988 989 990 |
# File 'lib/vericred_client/api/providers_api.rb', line 988 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.
999 1000 1001 1002 |
# File 'lib/vericred_client/api/providers_api.rb', line 999 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.
1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 |
# File 'lib/vericred_client/api/providers_api.rb', line 1009 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. |
1058 1059 1060 1061 |
# File 'lib/vericred_client/api/providers_api.rb', line 1058 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. |
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 |
# File 'lib/vericred_client/api/providers_api.rb', line 1071 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. #### 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" } “`
1125 1126 1127 1128 |
# File 'lib/vericred_client/api/providers_api.rb', line 1125 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. #### 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" } ```
1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 |
# File 'lib/vericred_client/api/providers_api.rb', line 1135 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.
1183 1184 1185 1186 |
# File 'lib/vericred_client/api/providers_api.rb', line 1183 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.
1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
# File 'lib/vericred_client/api/providers_api.rb', line 1194 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 |