Class: CandidApiClient::FeeSchedules::V3::AsyncV3Client
- Inherits:
-
Object
- Object
- CandidApiClient::FeeSchedules::V3::AsyncV3Client
- 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, payer_plan_group_ids: 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, payer_plan_group_ids: 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::AsyncV3Client 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::AsyncV3Client
356 357 358 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 356 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
352 353 354 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 352 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.
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 602 def delete_rate(rate_id:, version:, request_options: nil) Async do @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 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.
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 369 def get_match(service_line_id:, request_options: nil) Async do 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 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, payer_plan_group_ids: 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.
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 433 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, payer_plan_group_ids: nil, cpt_code: nil, modifiers: nil, request_options: nil) Async do 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, "payer_plan_group_ids": payer_plan_group_ids, "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 end |
#get_payer_thresholds(payer_uuids:, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::PayerThresholdsPage
Gets a list of payers and thresholds by their uuids
650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 650 def get_payer_thresholds(payer_uuids:, request_options: nil) Async do 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 end |
#get_payer_thresholds_default(request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::PayerThreshold
Gets the default payer threshold
625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 625 def get_payer_thresholds_default(request_options: nil) Async do 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 end |
#get_rate_history(rate_id:, request_options: nil) ⇒ Array<CandidApiClient::FeeSchedules::V3::Types::Rate>
Gets every version of a rate.
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 531 def get_rate_history(rate_id:, request_options: nil) Async do 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 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, payer_plan_group_ids: 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.
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 489 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, payer_plan_group_ids: nil, cpt_code: nil, modifiers: nil, request_options: nil) Async do 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, "payer_plan_group_ids": payer_plan_group_ids, "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 end |
#set_payer_threshold(payer_uuid:, request:, request_options: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::PayerThreshold
Sets the threshold information for a payer
683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 683 def set_payer_threshold(payer_uuid:, request:, request_options: nil) Async do 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 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.
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 395 def test_match(service_line_id:, rate_id:, request_options: nil) Async do 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 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.
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
# File 'lib/candidhealth/fee_schedules/v_3/client.rb', line 566 def upload_fee_schedule(dry_run:, rates:, request_options: nil) Async do 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 end |