Class: CandidApiClient::Credentialing::V2::AsyncV2Client

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/credentialing/v_2/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request_client:) ⇒ CandidApiClient::Credentialing::V2::AsyncV2Client

Parameters:



362
363
364
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 362

def initialize(request_client:)
  @request_client = request_client
end

Instance Attribute Details

#request_clientCandidApiClient::AsyncRequestClient (readonly)



358
359
360
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 358

def request_client
  @request_client
end

Instance Method Details

#create(rendering_provider_id:, contracting_provider_id:, payer_uuid:, regions:, start_date: nil, end_date: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil) ⇒ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.credentialing.v_2.create(
  rendering_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
  contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
  payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
)

Parameters:

  • rendering_provider_id (String)

    The ID of the rendering provider covered by the credentialing span.

  • contracting_provider_id (String)

    The ID of the billing provider for which the service facility is covered by the credentialing span.

  • payer_uuid (String)

    The ID of the payer covered by the credentialing span.

  • start_date (Date) (defaults to: nil)

    Start date of the credentialing span.

  • end_date (Date) (defaults to: nil)

    End date of the credentialing span.

  • regions (CandidApiClient::Commons::Types::Regions)

    The states covered by the credentialing span. A span may be national and cover all states.

  • submitted_date (Date) (defaults to: nil)

    Date that the credential paperwork was submitted.

  • payer_loaded_date (Date) (defaults to: nil)

    Date that the payer loaded the credentialing span into their system.

  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 556

def create(rendering_provider_id:, contracting_provider_id:, payer_uuid:, regions:, start_date: nil,
           end_date: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
  Async do
    response = @request_client.conn.post do |req|
      req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
      req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
      req.headers = {
    **(req.headers || {}),
    **@request_client.get_headers,
    **(request_options&.additional_headers || {})
      }.compact
      req.body = {
        **(request_options&.additional_body_parameters || {}),
        rendering_provider_id: rendering_provider_id,
        contracting_provider_id: contracting_provider_id,
        payer_uuid: payer_uuid,
        start_date: start_date,
        end_date: end_date,
        regions: regions,
        submitted_date: ,
        payer_loaded_date: payer_loaded_date
      }.compact
      req.url "#{@request_client.get_url(environment: CandidApi,
                                         request_options: request_options)}/api/provider-credentialing-span/v2"
    end
    CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan.from_json(json_object: response.body)
  end
end

#create_facility(service_facility_id:, contracting_provider_id:, payer_uuid:, start_date: nil, end_date: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil) ⇒ CandidApiClient::Credentialing::V2::Types::FacilityCredentialingSpan

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.credentialing.v_2.create_facility(
  service_facility_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
  contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
  payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
)

Parameters:

  • service_facility_id (String)

    The ID of the service facility covered by the credentialing span.

  • contracting_provider_id (String)

    The ID of the billing provider for which the service facility is covered by the credentialing span.

  • payer_uuid (String)

    The ID of the payer covered by the credentialing span.

  • start_date (Date) (defaults to: nil)

    Start date of the credentialing span.

  • end_date (Date) (defaults to: nil)

    End date of the credentialing span.

  • submitted_date (Date) (defaults to: nil)

    Date that the credential paperwork was submitted.

  • payer_loaded_date (Date) (defaults to: nil)

    Date that the payer loaded the credentialing span into their system.

  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 383

def create_facility(service_facility_id:, contracting_provider_id:, payer_uuid:, start_date: nil,
                    end_date: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
  Async do
    response = @request_client.conn.post do |req|
      req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
      req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
      req.headers = {
    **(req.headers || {}),
    **@request_client.get_headers,
    **(request_options&.additional_headers || {})
      }.compact
      req.body = {
        **(request_options&.additional_body_parameters || {}),
        service_facility_id: service_facility_id,
        contracting_provider_id: contracting_provider_id,
        payer_uuid: payer_uuid,
        start_date: start_date,
        end_date: end_date,
        submitted_date: ,
        payer_loaded_date: payer_loaded_date
      }.compact
      req.url "#{@request_client.get_url(environment: CandidApi,
                                         request_options: request_options)}/api/provider-credentialing-span/v2/facility"
    end
    CandidApiClient::Credentialing::V2::Types::FacilityCredentialingSpan.from_json(json_object: response.body)
  end
end

#delete(provider_credentialing_id:, request_options: nil) ⇒ Void

Soft deletes a credentialing span rate from the system.

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.credentialing.v_2.delete(provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")

Parameters:

Returns:

  • (Void)


657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 657

def delete(provider_credentialing_id:, request_options: nil)
  Async do
    @request_client.conn.delete do |req|
      req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
      req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
      req.headers = {
    **(req.headers || {}),
    **@request_client.get_headers,
    **(request_options&.additional_headers || {})
      }.compact
      req.url "#{@request_client.get_url(environment: CandidApi,
                                         request_options: request_options)}/api/provider-credentialing-span/v2/#{provider_credentialing_id}"
    end
  end
end

#delete_facility(facility_credentialing_id:, request_options: nil) ⇒ Void

Soft deletes a credentialing span rate from the system.

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.credentialing.v_2.delete_facility(facility_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")

Parameters:

Returns:

  • (Void)


478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 478

def delete_facility(facility_credentialing_id:, request_options: nil)
  Async do
    @request_client.conn.delete do |req|
      req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
      req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
      req.headers = {
    **(req.headers || {}),
    **@request_client.get_headers,
    **(request_options&.additional_headers || {})
      }.compact
      req.url "#{@request_client.get_url(environment: CandidApi,
                                         request_options: request_options)}/api/provider-credentialing-span/v2/facility/#{facility_credentialing_id}"
    end
  end
end

#get(provider_credentialing_id:, request_options: nil) ⇒ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.credentialing.v_2.get(provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")

Parameters:

Returns:



591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 591

def get(provider_credentialing_id:, request_options: nil)
  Async do
    response = @request_client.conn.get do |req|
      req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
      req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
      req.headers = {
    **(req.headers || {}),
    **@request_client.get_headers,
    **(request_options&.additional_headers || {})
      }.compact
      req.url "#{@request_client.get_url(environment: CandidApi,
                                         request_options: request_options)}/api/provider-credentialing-span/v2/#{provider_credentialing_id}"
    end
    CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan.from_json(json_object: response.body)
  end
end

#get_all(limit: nil, page_token: nil, payer_uuid: nil, provider_id: nil, as_rendering_provider: nil, as_contracting_provider: nil, request_options: nil) ⇒ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.credentialing.v_2.get_all

Parameters:

  • limit (Integer) (defaults to: nil)

    Maximum number of entities per page, defaults to 100.

  • page_token (String) (defaults to: nil)
  • payer_uuid (String) (defaults to: nil)

    Filter by payer.

  • provider_id (String) (defaults to: nil)

    Filter to a particular provider. Use in conjunction as_rendering_provider and as_contracting_provider.

  • as_rendering_provider (Boolean) (defaults to: nil)

    Filter to credentialing spans where the provider is a rendering provider. To use this filter provider_id is required.

  • as_contracting_provider (Boolean) (defaults to: nil)

    Filter to credentialing spans where the provider is a contracting provider. To use this filter provider_id is required.

  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 622

def get_all(limit: nil, page_token: nil, payer_uuid: nil, provider_id: nil, as_rendering_provider: nil,
            as_contracting_provider: nil, request_options: nil)
  Async do
    response = @request_client.conn.get do |req|
      req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
      req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
      req.headers = {
    **(req.headers || {}),
    **@request_client.get_headers,
    **(request_options&.additional_headers || {})
      }.compact
      req.params = {
        **(request_options&.additional_query_parameters || {}),
        "limit": limit,
        "page_token": page_token,
        "payer_uuid": payer_uuid,
        "provider_id": provider_id,
        "as_rendering_provider": as_rendering_provider,
        "as_contracting_provider": as_contracting_provider
      }.compact
      req.url "#{@request_client.get_url(environment: CandidApi,
                                         request_options: request_options)}/api/provider-credentialing-span/v2"
    end
    CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage.from_json(json_object: response.body)
  end
end

#get_all_facilities(limit: nil, page_token: nil, payer_uuid: nil, contracting_provider_id: nil, service_facility_id: nil, request_options: nil) ⇒ CandidApiClient::Credentialing::V2::Types::FacilityCredentialingSpanPage

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.credentialing.v_2.get_all_facilities

Parameters:

  • limit (Integer) (defaults to: nil)

    Maximum number of entities per page, defaults to 100.

  • page_token (String) (defaults to: nil)
  • payer_uuid (String) (defaults to: nil)

    Filter by payer.

  • contracting_provider_id (String) (defaults to: nil)

    Filter to a particular contracting provider.

  • service_facility_id (String) (defaults to: nil)

    Filter to a particular service facility.

  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 444

def get_all_facilities(limit: nil, page_token: nil, payer_uuid: nil, contracting_provider_id: nil,
                       service_facility_id: nil, request_options: nil)
  Async do
    response = @request_client.conn.get do |req|
      req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
      req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
      req.headers = {
    **(req.headers || {}),
    **@request_client.get_headers,
    **(request_options&.additional_headers || {})
      }.compact
      req.params = {
        **(request_options&.additional_query_parameters || {}),
        "limit": limit,
        "page_token": page_token,
        "payer_uuid": payer_uuid,
        "contracting_provider_id": contracting_provider_id,
        "service_facility_id": service_facility_id
      }.compact
      req.url "#{@request_client.get_url(environment: CandidApi,
                                         request_options: request_options)}/api/provider-credentialing-span/v2/facility"
    end
    CandidApiClient::Credentialing::V2::Types::FacilityCredentialingSpanPage.from_json(json_object: response.body)
  end
end

#get_facility(facility_credentialing_id:, request_options: nil) ⇒ CandidApiClient::Credentialing::V2::Types::FacilityCredentialingSpan

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.credentialing.v_2.get_facility(facility_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")

Parameters:

Returns:



417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 417

def get_facility(facility_credentialing_id:, request_options: nil)
  Async do
    response = @request_client.conn.get do |req|
      req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
      req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
      req.headers = {
    **(req.headers || {}),
    **@request_client.get_headers,
    **(request_options&.additional_headers || {})
      }.compact
      req.url "#{@request_client.get_url(environment: CandidApi,
                                         request_options: request_options)}/api/provider-credentialing-span/v2/facility/#{facility_credentialing_id}"
    end
    CandidApiClient::Credentialing::V2::Types::FacilityCredentialingSpan.from_json(json_object: response.body)
  end
end

#update(provider_credentialing_id:, contracting_provider_id: nil, payer_uuid: nil, start_date: nil, end_date: nil, regions: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil) ⇒ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.credentialing.v_2.update(provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")

Parameters:

  • provider_credentialing_id (String)
  • contracting_provider_id (String) (defaults to: nil)

    The ID of the billing provider for which the service facility is covered by the credentialing span.

  • payer_uuid (String) (defaults to: nil)

    The ID of the payer doing the credentialing.

  • start_date (Date) (defaults to: nil)

    Start date of the credentialing span.

  • end_date (Date) (defaults to: nil)

    End date of the credentialing span.

  • regions (CandidApiClient::Commons::Types::Regions) (defaults to: nil)

    The states covered by the credentialing span. A span may be national and cover all states.

  • submitted_date (Date) (defaults to: nil)

    Date that the credential paperwork was submitted.

  • payer_loaded_date (Date) (defaults to: nil)

    Date that the payer loaded the credentialing span into their system.

  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 688

def update(provider_credentialing_id:, contracting_provider_id: nil, payer_uuid: nil, start_date: nil,
           end_date: nil, regions: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
  Async do
    response = @request_client.conn.patch do |req|
      req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
      req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
      req.headers = {
    **(req.headers || {}),
    **@request_client.get_headers,
    **(request_options&.additional_headers || {})
      }.compact
      req.body = {
        **(request_options&.additional_body_parameters || {}),
        contracting_provider_id: contracting_provider_id,
        payer_uuid: payer_uuid,
        start_date: start_date,
        end_date: end_date,
        regions: regions,
        submitted_date: ,
        payer_loaded_date: payer_loaded_date
      }.compact
      req.url "#{@request_client.get_url(environment: CandidApi,
                                         request_options: request_options)}/api/provider-credentialing-span/v2/#{provider_credentialing_id}"
    end
    CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan.from_json(json_object: response.body)
  end
end

#update_facility(facility_credentialing_id:, contracting_provider_id:, payer_uuid: nil, start_date: nil, end_date: nil, regions: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil) ⇒ CandidApiClient::Credentialing::V2::Types::FacilityCredentialingSpan

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.credentialing.v_2.update_facility(facility_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")

Parameters:

  • facility_credentialing_id (String)
  • contracting_provider_id (String)

    The ID of the billing provider for which the service facility is covered by the credentialing span.

  • payer_uuid (String) (defaults to: nil)

    The ID of the payer doing the credentialing.

  • start_date (Date) (defaults to: nil)

    Start date of the credentialing span.

  • end_date (Date) (defaults to: nil)

    End date of the credentialing span.

  • regions (CandidApiClient::Commons::Types::Regions) (defaults to: nil)

    The states covered by the credentialing span. A span may be national and cover all states.

  • submitted_date (Date) (defaults to: nil)

    Date that the credential paperwork was submitted.

  • payer_loaded_date (Date) (defaults to: nil)

    Date that the payer loaded the credentialing span into their system.

  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# File 'lib/candidhealth/credentialing/v_2/client.rb', line 509

def update_facility(facility_credentialing_id:, contracting_provider_id:, payer_uuid: nil, start_date: nil,
                    end_date: nil, regions: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
  Async do
    response = @request_client.conn.patch do |req|
      req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
      req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
      req.headers = {
    **(req.headers || {}),
    **@request_client.get_headers,
    **(request_options&.additional_headers || {})
      }.compact
      req.body = {
        **(request_options&.additional_body_parameters || {}),
        contracting_provider_id: contracting_provider_id,
        payer_uuid: payer_uuid,
        start_date: start_date,
        end_date: end_date,
        regions: regions,
        submitted_date: ,
        payer_loaded_date: payer_loaded_date
      }.compact
      req.url "#{@request_client.get_url(environment: CandidApi,
                                         request_options: request_options)}/api/provider-credentialing-span/v2/facility/#{facility_credentialing_id}"
    end
    CandidApiClient::Credentialing::V2::Types::FacilityCredentialingSpan.from_json(json_object: response.body)
  end
end