Class: CandidApiClient::EncounterProviders::V2::V2Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Parameters:



24
25
26
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 24

def initialize(request_client:)
  @request_client = request_client
end

Instance Attribute Details

#request_clientCandidApiClient::RequestClient (readonly)



20
21
22
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 20

def request_client
  @request_client
end

Instance Method Details

#create_initial_referring_provider(encounter_id:, request:, request_options: nil) ⇒ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.encounter_providers.v_2.create_initial_referring_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" })

Parameters:

  • encounter_id (String)
  • request (Hash)

    Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider, as a Hash

    • :npi (String)

    • :taxonomy_code (String)

    • :address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

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

      • :zip_code (String)

    • :qualifier (CandidApiClient::Commons::Types::QualifierCode)

    • :first_name (String)

    • :last_name (String)

    • :organization_name (String)

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

Returns:



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 224

def create_initial_referring_provider(encounter_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/encounter-providers/v2/#{encounter_id}/create-initial-referring-provider"
  end
  CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
end

#create_ordering_provider(service_line_id:, request:, request_options: nil) ⇒ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.encounter_providers.v_2.create_ordering_provider(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" })

Parameters:

  • service_line_id (String)
  • request (Hash)

    Request of type CandidApiClient::EncounterProviders::V2::Types::OrderingProvider, as a Hash

    • :npi (String)

    • :taxonomy_code (String)

    • :address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

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

      • :zip_code (String)

    • :first_name (String)

    • :last_name (String)

    • :organization_name (String)

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

Returns:



294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 294

def create_ordering_provider(service_line_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/encounter-providers/v2/#{service_line_id}/create-ordering-provider"
  end
  CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
end

#create_referring_provider(encounter_id:, request:, request_options: nil) ⇒ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.encounter_providers.v_2.create_referring_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" })

Parameters:

  • encounter_id (String)
  • request (Hash)

    Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProvider, as a Hash

    • :npi (String)

    • :taxonomy_code (String)

    • :address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

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

      • :zip_code (String)

    • :first_name (String)

    • :last_name (String)

    • :organization_name (String)

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

Returns:



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 188

def create_referring_provider(encounter_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/encounter-providers/v2/#{encounter_id}/create-referring-provider"
  end
  CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
end

#create_supervising_provider(encounter_id:, request:, request_options: nil) ⇒ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.encounter_providers.v_2.create_supervising_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" })

Parameters:

  • encounter_id (String)
  • request (Hash)

    Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider, as a Hash

    • :npi (String)

    • :taxonomy_code (String)

    • :address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

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

      • :zip_code (String)

    • :first_name (String)

    • :last_name (String)

    • :organization_name (String)

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

Returns:



259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 259

def create_supervising_provider(encounter_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/encounter-providers/v2/#{encounter_id}/create-supervising-provider"
  end
  CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
end

#delete_initial_referring_provider(encounter_id:, request_options: nil) ⇒ Void

Examples:

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

Parameters:

Returns:

  • (Void)


336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 336

def delete_initial_referring_provider(encounter_id:, request_options: nil)
  @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/encounter-providers/v2/#{encounter_id}/initial-referring-provider"
  end
end

#delete_ordering_provider(service_line_id:, request_options: nil) ⇒ Void

Examples:

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

Parameters:

Returns:

  • (Void)


376
377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 376

def delete_ordering_provider(service_line_id:, request_options: nil)
  @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/encounter-providers/v2/#{service_line_id}/ordering-provider"
  end
end

#delete_referring_provider(encounter_id:, request_options: nil) ⇒ Void

Examples:

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

Parameters:

Returns:

  • (Void)


316
317
318
319
320
321
322
323
324
325
326
327
328
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 316

def delete_referring_provider(encounter_id:, request_options: nil)
  @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/encounter-providers/v2/#{encounter_id}/referring-provider"
  end
end

#delete_supervising_provider(encounter_id:, request_options: nil) ⇒ Void

Examples:

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

Parameters:

Returns:

  • (Void)


356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 356

def delete_supervising_provider(encounter_id:, request_options: nil)
  @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/encounter-providers/v2/#{encounter_id}/supervising-provider"
  end
end

#update_initial_referring_provider(encounter_id:, request:, request_options: nil) ⇒ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.encounter_providers.v_2.update_initial_referring_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" })

Parameters:

  • encounter_id (String)
  • request (Hash)

    Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate, as a Hash

    • :npi (String)

    • :taxonomy_code (String)

    • :address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

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

      • :zip_code (String)

    • :qualifier (CandidApiClient::Commons::Types::QualifierCode)

    • :first_name (String)

    • :last_name (String)

    • :organization_name (String)

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

Returns:



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 83

def update_initial_referring_provider(encounter_id:, request:, request_options: nil)
  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 || {}), **(request_options&.additional_body_parameters || {}) }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/initial-referring-provider"
  end
  CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
end

#update_ordering_provider(service_line_id:, request:, request_options: nil) ⇒ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.encounter_providers.v_2.update_ordering_provider(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" })

Parameters:

  • service_line_id (String)
  • request (Hash)

    Request of type CandidApiClient::EncounterProviders::V2::Types::OrderingProviderUpdate, as a Hash

    • :npi (String)

    • :taxonomy_code (String)

    • :address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

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

      • :zip_code (String)

    • :first_name (String)

    • :last_name (String)

    • :organization_name (String)

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

Returns:



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 153

def update_ordering_provider(service_line_id:, request:, request_options: nil)
  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 || {}), **(request_options&.additional_body_parameters || {}) }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/encounter-providers/v2/#{service_line_id}/ordering-provider"
  end
  CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
end

#update_referring_provider(encounter_id:, request:, request_options: nil) ⇒ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.encounter_providers.v_2.update_referring_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" })

Parameters:

  • encounter_id (String)
  • request (Hash)

    Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate, as a Hash

    • :npi (String)

    • :taxonomy_code (String)

    • :address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

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

      • :zip_code (String)

    • :first_name (String)

    • :last_name (String)

    • :organization_name (String)

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

Returns:



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 47

def update_referring_provider(encounter_id:, request:, request_options: nil)
  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 || {}), **(request_options&.additional_body_parameters || {}) }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}"
  end
  CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
end

#update_supervising_provider(encounter_id:, request:, request_options: nil) ⇒ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.encounter_providers.v_2.update_supervising_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" })

Parameters:

  • encounter_id (String)
  • request (Hash)

    Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash

    • :npi (String)

    • :taxonomy_code (String)

    • :address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

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

      • :zip_code (String)

    • :first_name (String)

    • :last_name (String)

    • :organization_name (String)

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

Returns:



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/candidhealth/encounter_providers/v_2/client.rb', line 118

def update_supervising_provider(encounter_id:, request:, request_options: nil)
  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 || {}), **(request_options&.additional_body_parameters || {}) }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/supervising-provider"
  end
  CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
end