Class: CandidApiClient::FeeSchedules::V3::V3Client
- Inherits:
-
Object
- Object
- CandidApiClient::FeeSchedules::V3::V3Client
- Defined in:
- lib/candidhealth/fee_schedules/v_3/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#delete_rate(rate_id:, version:, request_options: nil) ⇒ Void
Soft deletes a rate from the system.
-
#get_match(service_line_id:, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::MatchResult
Gets the rate that matches a service line.
-
#get_multi(page_token: nil, limit: nil, active_date: nil, payer_uuid: nil, organization_billing_provider_id: nil, states: nil, zip_codes: nil, license_types: nil, facility_type_codes: nil, network_types: nil, cpt_code: nil, modifiers: nil, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::RatesPage
Gets a list of dimensions with their rates.
-
#get_payer_thresholds(payer_uuids:, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::PayerThresholdsPage
Gets a list of payers and thresholds by their uuids.
-
#get_payer_thresholds_default(request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::PayerThreshold
Gets the default payer threshold.
-
#get_rate_history(rate_id:, request_options: nil) ⇒ Array<CandidApiClient::FeeSchedules::V3::Types::Rate>
Gets every version of a rate.
-
#get_unique_values_for_dimension(pivot_dimension:, page_token: nil, limit: nil, payer_uuid: nil, organization_billing_provider_id: nil, states: nil, zip_codes: nil, license_types: nil, facility_type_codes: nil, network_types: nil, cpt_code: nil, modifiers: nil, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::DimensionsPage
Gets unique values for a dimension based on other selection criteria.
- #initialize(request_client:) ⇒ CandidApiClient::FeeSchedules::V3::V3Client constructor
-
#set_payer_threshold(payer_uuid:, request:, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::PayerThreshold
Sets the threshold information for a payer.
-
#test_match(service_line_id:, rate_id:, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::MatchTestResult
Tests a service line against a rate to see if it matches.
-
#upload_fee_schedule(dry_run:, rates:, request_options: nil) ⇒ Array<CandidApiClient::FeeSchedules::V3::Types::Rate>
Uploads a new fee schedule.n Each rate may either be totally new as qualified by it’s dimensions or a new version for an existing rate.n If adding a new version to an existing rate, the rate must be posted with the next version number (previous version + 1) or a EntityConflictError will be returned.n Use the dry run flag to discover already existing rates and to run validations.
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::FeeSchedules::V3::V3Client
31 32 33 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 31 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
27 28 29 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 27 def request_client @request_client end |
Instance Method Details
#delete_rate(rate_id:, version:, request_options: nil) ⇒ Void
Soft deletes a rate from the system. Only the most recent version of a rate can
be deleted.
283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 283 def delete_rate(rate_id:, version:, request_options: nil) @request_client.conn.delete do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/fee-schedules/v3/#{rate_id}/#{version}" end end |
#get_match(service_line_id:, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::MatchResult
Gets the rate that matches a service line. No result means no rate exists
matching the service line's dimensions.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 44 def get_match(service_line_id:, request_options: nil) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/fee-schedules/v3/service-line/#{service_line_id}/match" end CandidApiClient::FeeSchedules::V3::Types::MatchResult.from_json(json_object: response.body) end |
#get_multi(page_token: nil, limit: nil, active_date: nil, payer_uuid: nil, organization_billing_provider_id: nil, states: nil, zip_codes: nil, license_types: nil, facility_type_codes: nil, network_types: nil, cpt_code: nil, modifiers: nil, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::RatesPage
Gets a list of dimensions with their rates. The rates returned will always be
the most recent versions of those rates.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 116 def get_multi(page_token: nil, limit: nil, active_date: nil, payer_uuid: nil, organization_billing_provider_id: nil, states: nil, zip_codes: nil, license_types: nil, facility_type_codes: nil, network_types: nil, cpt_code: nil, modifiers: nil, request_options: nil) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.params = { **(&.additional_query_parameters || {}), "page_token": page_token, "limit": limit, "active_date": active_date, "payer_uuid": payer_uuid, "organization_billing_provider_id": organization_billing_provider_id, "states": states, "zip_codes": zip_codes, "license_types": license_types, "facility_type_codes": facility_type_codes, "network_types": network_types, "cpt_code": cpt_code, "modifiers": modifiers }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/fee-schedules/v3" end CandidApiClient::FeeSchedules::V3::Types::RatesPage.from_json(json_object: response.body) end |
#get_payer_thresholds(payer_uuids:, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::PayerThresholdsPage
Gets a list of payers and thresholds by their uuids
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 327 def get_payer_thresholds(payer_uuids:, request_options: nil) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.params = { **(&.additional_query_parameters || {}), "payer_uuids": payer_uuids }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/fee-schedules/v3/payer-threshold" end CandidApiClient::FeeSchedules::V3::Types::PayerThresholdsPage.from_json(json_object: response.body) end |
#get_payer_thresholds_default(request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::PayerThreshold
Gets the default payer threshold
304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 304 def get_payer_thresholds_default(request_options: nil) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/fee-schedules/v3/payer-threshold/default" end CandidApiClient::FeeSchedules::V3::Types::PayerThreshold.from_json(json_object: response.body) end |
#get_rate_history(rate_id:, request_options: nil) ⇒ Array<CandidApiClient::FeeSchedules::V3::Types::Rate>
Gets every version of a rate.
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 220 def get_rate_history(rate_id:, request_options: nil) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/fee-schedules/v3/#{rate_id}/history" end parsed_json = JSON.parse(response.body) parsed_json&.map do |item| item = item.to_json CandidApiClient::FeeSchedules::V3::Types::Rate.from_json(json_object: item) end end |
#get_unique_values_for_dimension(pivot_dimension:, page_token: nil, limit: nil, payer_uuid: nil, organization_billing_provider_id: nil, states: nil, zip_codes: nil, license_types: nil, facility_type_codes: nil, network_types: nil, cpt_code: nil, modifiers: nil, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::DimensionsPage
Gets unique values for a dimension based on other selection criteria. The
response is a list of dimensions with your criteria and the unique values
populated. This API is useful for driving pivots on dimension values.
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 181 def get_unique_values_for_dimension(pivot_dimension:, page_token: nil, limit: nil, payer_uuid: nil, organization_billing_provider_id: nil, states: nil, zip_codes: nil, license_types: nil, facility_type_codes: nil, network_types: nil, cpt_code: nil, modifiers: nil, request_options: nil) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.params = { **(&.additional_query_parameters || {}), "page_token": page_token, "limit": limit, "pivot_dimension": pivot_dimension, "payer_uuid": payer_uuid, "organization_billing_provider_id": organization_billing_provider_id, "states": states, "zip_codes": zip_codes, "license_types": license_types, "facility_type_codes": facility_type_codes, "network_types": network_types, "cpt_code": cpt_code, "modifiers": modifiers }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/fee-schedules/v3/unique-dimension-values" end CandidApiClient::FeeSchedules::V3::Types::DimensionsPage.from_json(json_object: response.body) end |
#set_payer_threshold(payer_uuid:, request:, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::PayerThreshold
Sets the threshold information for a payer
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 355 def set_payer_threshold(payer_uuid:, request:, request_options: nil) response = @request_client.conn.put do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(request || {}), **(&.additional_body_parameters || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/fee-schedules/v3/payer-threshold/#{payer_uuid}" end CandidApiClient::FeeSchedules::V3::Types::PayerThreshold.from_json(json_object: response.body) end |
#test_match(service_line_id:, rate_id:, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::MatchTestResult
Tests a service line against a rate to see if it matches.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 68 def test_match(service_line_id:, rate_id:, request_options: nil) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/fee-schedules/v3/service-line/#{service_line_id}/match/#{rate_id}" end CandidApiClient::FeeSchedules::V3::Types::MatchTestResult.from_json(json_object: response.body) end |
#upload_fee_schedule(dry_run:, rates:, request_options: nil) ⇒ Array<CandidApiClient::FeeSchedules::V3::Types::Rate>
Uploads a new fee schedule.n Each rate may either be totally new as qualified
by it's dimensions or a new version for an existing rate.\n If adding a new
version to an existing rate, the rate must be posted with the next version
number (previous version + 1) or a EntityConflictError will be returned.\n Use
the dry run flag to discover already existing rates and to run validations. If
validations for any rate fail, no rates will be saved to the system.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 253 def upload_fee_schedule(dry_run:, rates:, request_options: nil) response = @request_client.conn.post do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(&.additional_body_parameters || {}), dry_run: dry_run, rates: rates }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/fee-schedules/v3" end parsed_json = JSON.parse(response.body) parsed_json&.map do |item| item = item.to_json CandidApiClient::FeeSchedules::V3::Types::Rate.from_json(json_object: item) end end |