Class: CandidApiClient::ExpectedNetworkStatus::V2::V2Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request_client:) ⇒ CandidApiClient::ExpectedNetworkStatus::V2::V2Client

Parameters:



19
20
21
# File 'lib/candidhealth/expected_network_status/v_2/client.rb', line 19

def initialize(request_client:)
  @request_client = request_client
end

Instance Attribute Details

#request_clientCandidApiClient::RequestClient (readonly)



15
16
17
# File 'lib/candidhealth/expected_network_status/v_2/client.rb', line 15

def request_client
  @request_client
end

Instance Method Details

#compute_all_in_network_providers(request:, request_options: nil) ⇒ CandidApiClient::ExpectedNetworkStatus::V2::Types::ComputeAllInNetworkProvidersResponse

Computes all the in network providers for a given set of inputs.

This endpoint is not available to all customers. Reach out to the Candid sales
team
to discuss enabling this endpoint if it is not available for your organization.

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.expected_network_status.v_2.compute_all_in_network_providers(request: { service_type: NEW_PATIENT_VIDEO_APPT, place_of_service_code: PHARMACY, subscriber_information: { payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string", insurance_type: { line_of_business: MEDICARE } }, patient_address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, billing_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", organization_service_facility_id: "30F55EE6-8C0E-43FC-A7FC-DAC00D5BF569", date_of_service: DateTime.parse(2023-01-15) })

Parameters:

  • request (Hash)

    Request of type CandidApiClient::ExpectedNetworkStatus::V2::Types::ComputeAllInNetworkProvidersRequest, as a Hash

    • :service_type (CandidApiClient::ExpectedNetworkStatus::V2::Types::ServiceType)

    • :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)

    • :subscriber_information (Hash)

      • :payer_uuid (String)

      • :member_id (String)

      • :insurance_type (Hash)

        • :line_of_business (CandidApiClient::ExpectedNetworkStatus::V2::Types::LineOfBusiness)

        • :insurance_type_codes (Hash)

    • :patient_address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

      • :state (CandidApiClient::Commons::Types::State)

      • :zip_code (String)

    • :billing_provider_id (String)

    • :organization_service_facility_id (String)

    • :date_of_service (Date)

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

Returns:



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/candidhealth/expected_network_status/v_2/client.rb', line 98

def compute_all_in_network_providers(request:, request_options: nil)
  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 || {}), **(request_options&.additional_body_parameters || {}) }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/expected-network-status/v2/compute"
  end
  CandidApiClient::ExpectedNetworkStatus::V2::Types::ComputeAllInNetworkProvidersResponse.from_json(json_object: response.body)
end

#compute_for_rendering_provider(rendering_provider_id:, request:, request_options: nil) ⇒ CandidApiClient::ExpectedNetworkStatus::V2::Types::ExpectedNetworkStatusResponseV2

Computes the expected network status for a given rendering provider.

This endpoint is not available to all customers. Reach out to the Candid sales
team
to discuss enabling this endpoint if it is not available for your organization.

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.expected_network_status.v_2.compute_for_rendering_provider(rendering_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { service_type: NEW_PATIENT_VIDEO_APPT, place_of_service_code: PHARMACY, subscriber_information: { payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string", insurance_type: { line_of_business: MEDICARE } }, patient_address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, billing_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", organization_service_facility_id: "30F55EE6-8C0E-43FC-A7FC-DAC00D5BF569", date_of_service: DateTime.parse(2023-01-15) })

Parameters:

  • rendering_provider_id (String)
  • request (Hash)

    Request of type CandidApiClient::ExpectedNetworkStatus::V2::Types::ExpectedNetworkStatusRequestV2, as a Hash

    • :service_type (CandidApiClient::ExpectedNetworkStatus::V2::Types::ServiceType)

    • :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)

    • :subscriber_information (Hash)

      • :payer_uuid (String)

      • :member_id (String)

      • :insurance_type (Hash)

        • :line_of_business (CandidApiClient::ExpectedNetworkStatus::V2::Types::LineOfBusiness)

        • :insurance_type_codes (Hash)

    • :patient_address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

      • :state (CandidApiClient::Commons::Types::State)

      • :zip_code (String)

    • :billing_provider_id (String)

    • :organization_service_facility_id (String)

    • :date_of_service (Date)

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

Returns:



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/candidhealth/expected_network_status/v_2/client.rb', line 53

def compute_for_rendering_provider(rendering_provider_id:, request:, request_options: nil)
  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 || {}), **(request_options&.additional_body_parameters || {}) }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/expected-network-status/v2/compute/#{rendering_provider_id}"
  end
  CandidApiClient::ExpectedNetworkStatus::V2::Types::ExpectedNetworkStatusResponseV2.from_json(json_object: response.body)
end