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
-
#get_provider(npi, opts = {}) ⇒ ProviderShowResponse
Find a Provider To retrieve a specific provider, just perform a GET using his NPI number.
-
#get_provider_with_http_info(npi, opts = {}) ⇒ Array<(ProviderShowResponse, Fixnum, Hash)>
Find a Provider To retrieve a specific provider, just perform a GET using his NPI number.
-
#get_providers(opts = {}) ⇒ ProvidersSearchResponse
Find Providers All ‘Provider` searches require a `zip_code`, which we use for weighting the search results to favor `Provider`s that are near the user.
-
#get_providers_with_http_info(opts = {}) ⇒ Array<(ProvidersSearchResponse, Fixnum, Hash)>
Find Providers All `Provider` searches require a `zip_code`, which we use for weighting the search results to favor `Provider`s that are near the user.
-
#initialize(api_client = ApiClient.default) ⇒ ProvidersApi
constructor
A new instance of ProvidersApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ProvidersApi
Returns a new instance of ProvidersApi.
137 138 139 |
# File 'lib/vericred_client/api/providers_api.rb', line 137 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
135 136 137 |
# File 'lib/vericred_client/api/providers_api.rb', line 135 def api_client @api_client end |
Instance Method Details
#get_provider(npi, opts = {}) ⇒ ProviderShowResponse
Find a Provider To retrieve a specific provider, just perform a GET using his NPI number
148 149 150 151 |
# File 'lib/vericred_client/api/providers_api.rb', line 148 def get_provider(npi, opts = {}) data, _status_code, _headers = get_provider_with_http_info(npi, opts) return data end |
#get_provider_with_http_info(npi, opts = {}) ⇒ Array<(ProviderShowResponse, Fixnum, Hash)>
Find a Provider To retrieve a specific provider, just perform a GET using his NPI number
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/vericred_client/api/providers_api.rb', line 160 def get_provider_with_http_info(npi, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ProvidersApi.get_provider ..." end # verify the required parameter 'npi' is set fail ArgumentError, "Missing the required parameter 'npi' when calling ProvidersApi.get_provider" if npi.nil? # resource path local_var_path = "/providers/{npi}".sub('{format}','json').sub('{' + 'npi' + '}', npi.to_s) # query parameters query_params = {} query_params[:'year'] = opts[:'year'] if !opts[:'year'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].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 => 'ProviderShowResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProvidersApi#get_provider\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_providers(opts = {}) ⇒ ProvidersSearchResponse
Find Providers All ‘Provider` searches require a `zip_code`, which we use for weighting the search results to favor `Provider`s that are near the user. For example, we would want "Dr. John Smith" who is 5 miles away 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.
209 210 211 212 |
# File 'lib/vericred_client/api/providers_api.rb', line 209 def get_providers(opts = {}) data, _status_code, _headers = get_providers_with_http_info(opts) return data end |
#get_providers_with_http_info(opts = {}) ⇒ Array<(ProvidersSearchResponse, Fixnum, Hash)>
Find Providers All `Provider` searches require a `zip_code`, which we use for weighting the search results to favor `Provider`s that are near the user. For example, we would want "Dr. John Smith" who is 5 miles away 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.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/vericred_client/api/providers_api.rb', line 219 def get_providers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ProvidersApi.get_providers ..." end # 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(opts[:'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 |