Class: VericredClient::ProvidersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/vericred_client/api/providers_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_clientObject

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.

Parameters:

  • npi

    NPI number

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


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.

Parameters:

  • npi

    NPI number

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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. |

Parameters:

  • npi

    NPI number

  • line_of_coverage

    The line of coverage the plans are in. Options are &#x60;medical&#x60;, &#x60;medicare_advantage&#x60;, &#x60;dental&#x60;, or &#x60;vision&#x60;.

  • year

    The year the plans are effective in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :market (String)

    The market the plans are for. Options are &#x60;individual&#x60;, &#x60;small_group&#x60;, &#x60;large_group&#x60;.

Returns:



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 &#x60;v7&#x60;. If you are using previous versions and want to get the list of &#x60;plan_ids&#x60; that a provider accepts, you can use the &#x60;hios_ids&#x60; key in the Provider Show &#x60;GET /providers/:npi&#x60; endpoint. #### External Id Types Plan &#x60;external_ids&#x60; are returned as a list, with each item containing both a &#x60;type&#x60; and a &#x60;value&#x60;. 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. |

Parameters:

  • npi

    NPI number

  • line_of_coverage

    The line of coverage the plans are in. Options are &#x60;medical&#x60;, &#x60;medicare_advantage&#x60;, &#x60;dental&#x60;, or &#x60;vision&#x60;.

  • year

    The year the plans are effective in.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :market (String)

    The market the plans are for. Options are &#x60;individual&#x60;, &#x60;small_group&#x60;, &#x60;large_group&#x60;.

Returns:

  • (Array<(ProviderPlans, Fixnum, Hash)>)

    ProviderPlans data, response status code and response headers



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" } “`

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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 &#x60;search_term&#x60;, 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 &quot;Dr. John Smith&quot; who is 5 miles away from a given Zip Code to appear before &quot;Dr. John Smith&quot; who is 100 miles away. The weighting also allows for non-exact matches. In our prior example, we would want &quot;Dr. Jon Smith&quot; who is 2 miles away to appear before the exact match &quot;Dr. John Smith&quot; 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 &quot;body part&quot; Specialty name search. So, searching &quot;John Smith nose&quot; would return &quot;Dr. John Smith&quot;, the ENT Specialist before &quot;Dr. John Smith&quot; the Internist. In addition, we can filter &#x60;Providers&#x60; by whether or not they accept any insurance. Our data set includes over 4 million &#x60;Providers&#x60;, 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 &#x60;Provider&#x60; searches that do not specify &#x60;plan_ids&#x60; or &#x60;network_ids&#x60;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 &#x60;zip_code&#x60; parameter, we order the &#x60;Providers&#x60; 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 &#x60;radius&#x60; is also provided, we filter out &#x60;Providers&#x60; who are outside of that radius from the center of the Zip Code provided. #### Polygon When providing the &#x60;polygon&#x60; parameter, we filter providers who are outside the bounds of the shape provided. This is mutually exclusive with &#x60;zip_code&#x60; and &#x60;radius&#x60;. ### Specialty When providing the &#x60;specialty_ids&#x60; 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 &#x60;Plan&#x60; and &#x60;Network&#x60; participation, using &#x60;plan_ids&#x60; and &#x60;network_ids&#x60;, respectively. These filters are mutually exclusive and return the union of the resulting sets for each &#x60;Plan&#x60; or &#x60;Network&#x60;. I.e. if you provider Plan A and Plan B, you will receive &#x60;Providers&#x60; who accept either &#x60;Plan&#x60;. The same is true for &#x60;Networks&#x60;. 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* &#x60;{ &quot;search_term&quot;: &quot;Foo&quot;, &quot;zip_code&quot;: &quot;11215&quot; }&#x60; *Find all Providers within 5 miles of Brooklyn who accept a Plan* &#x60;{ &quot;zip_code&quot;: &quot;11215&quot;, &quot;radius&quot;: 5, &quot;plan_ids&quot;: [&quot;88582NY0230001&quot;] }&#x60; *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 &quot;ENT&quot;* &#x60;&#x60;&#x60; { &quot;polygon&quot;: [ {&quot;lon&quot;:-74.0126609802,&quot;lat&quot;:40.6275684851 }, {&quot;lon&quot;:-74.0126609802,&quot;lat&quot;:40.7097269508 }, {&quot;lon&quot;:-73.9367866516,&quot;lat&quot;:40.7097269508 }, {&quot;lon&quot;:-73.9367866516,&quot;lat&quot;:40.6275684851 } ], &quot;search_term&quot; : &quot;ENT&quot; } &#x60;&#x60;&#x60;

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ProvidersSearchResponse, Fixnum, Hash)>)

    ProvidersSearchResponse data, response status code and response headers



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.

Parameters:

  • npi

    NPI number

  • body

    Provider Record

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


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.

Parameters:

  • npi

    NPI number

  • body

    Provider Record

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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