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.



19
20
21
# File 'lib/vericred_client/api/providers_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/vericred_client/api/providers_api.rb', line 17

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)


28
29
30
31
# File 'lib/vericred_client/api/providers_api.rb', line 28

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



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/vericred_client/api/providers_api.rb', line 38

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
  if @api_client.config.client_side_validation && npi.nil?
    fail ArgumentError, "Missing the required parameter 'npi' when calling ProvidersApi.delete_provider"
  end
  # resource path
  local_var_path = "/providers/{npi}".sub('{' + 'npi' + '}', npi.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # 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_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. We can also use `min_score` to omit less relevant results. This makes sense in the case where your application wants to display all of the results returned regardless of how many there are. Otherwise, using our default `min_score` and pagination should be sufficient. ### 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`. ### Plan/Network Information We can also filter based on `Plan` and `Network` participation. 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`. ### 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, "hios_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:



82
83
84
85
# File 'lib/vericred_client/api/providers_api.rb', line 82

def get_providers(body, opts = {})
  data, _status_code, _headers = get_providers_with_http_info(body, opts)
  return data
end

#get_providers_0(body, opts = {}) ⇒ ProvidersGeocodeResponse

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. We can also use `min_score` to omit less relevant results. This makes sense in the case where your application wants to display all of the results returned regardless of how many there are. Otherwise, using our default `min_score` and pagination should be sufficient. ### 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`. ### Plan/Network Information We can also filter based on `Plan` and `Network` participation. 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`. ### 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, "hios_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:



133
134
135
136
# File 'lib/vericred_client/api/providers_api.rb', line 133

def get_providers_0(body, opts = {})
  data, _status_code, _headers = get_providers_0_with_http_info(body, opts)
  return data
end

#get_providers_0_with_http_info(body, opts = {}) ⇒ Array<(ProvidersGeocodeResponse, 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. We can also use &#x60;min_score&#x60; to omit less relevant results. This makes sense in the case where your application wants to display all of the results returned regardless of how many there are. Otherwise, using our default &#x60;min_score&#x60; and pagination should be sufficient. ### 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;. ### Plan/Network Information We can also filter based on &#x60;Plan&#x60; and &#x60;Network&#x60; participation. 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;. ### 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;hios_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<(ProvidersGeocodeResponse, Fixnum, Hash)>)

    ProvidersGeocodeResponse data, response status code and response headers



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/vericred_client/api/providers_api.rb', line 143

def get_providers_0_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProvidersApi.get_providers_0 ..."
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ProvidersApi.get_providers_0"
  end
  # resource path
  local_var_path = "/providers/search/geocode"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # 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 => 'ProvidersGeocodeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProvidersApi#get_providers_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
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. We can also use &#x60;min_score&#x60; to omit less relevant results. This makes sense in the case where your application wants to display all of the results returned regardless of how many there are. Otherwise, using our default &#x60;min_score&#x60; and pagination should be sufficient. ### 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;. ### Plan/Network Information We can also filter based on &#x60;Plan&#x60; and &#x60;Network&#x60; participation. 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;. ### 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;hios_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



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/vericred_client/api/providers_api.rb', line 92

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
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ProvidersApi.get_providers"
  end
  # resource path
  local_var_path = "/providers/search"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # 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)


185
186
187
188
# File 'lib/vericred_client/api/providers_api.rb', line 185

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



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/vericred_client/api/providers_api.rb', line 196

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
  if @api_client.config.client_side_validation && npi.nil?
    fail ArgumentError, "Missing the required parameter 'npi' when calling ProvidersApi.put_provider"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ProvidersApi.put_provider"
  end
  # resource path
  local_var_path = "/providers/{npi}".sub('{' + 'npi' + '}', npi.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # 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