candidhealth 0.32.0 → 0.33.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,789 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../requests"
4
+ require_relative "types/referring_provider_update"
5
+ require_relative "types/encounter_provider"
6
+ require_relative "types/initial_referring_provider_update"
7
+ require_relative "types/supervising_provider_update"
8
+ require_relative "types/ordering_provider_update"
9
+ require_relative "types/referring_provider"
10
+ require_relative "types/initial_referring_provider"
11
+ require_relative "types/supervising_provider"
12
+ require_relative "types/ordering_provider"
13
+ require "async"
14
+
15
+ module CandidApiClient
16
+ module EncounterProviders
17
+ module V2
18
+ class V2Client
19
+ # @return [CandidApiClient::RequestClient]
20
+ attr_reader :request_client
21
+
22
+ # @param request_client [CandidApiClient::RequestClient]
23
+ # @return [CandidApiClient::EncounterProviders::V2::V2Client]
24
+ def initialize(request_client:)
25
+ @request_client = request_client
26
+ end
27
+
28
+ # @param encounter_id [String]
29
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate, as a Hash
30
+ # * :npi (String)
31
+ # * :taxonomy_code (String)
32
+ # * :address (Hash)
33
+ # * :zip_plus_four_code (String)
34
+ # * :address_1 (String)
35
+ # * :address_2 (String)
36
+ # * :city (String)
37
+ # * :state (CandidApiClient::Commons::Types::State)
38
+ # * :zip_code (String)
39
+ # * :first_name (String)
40
+ # * :last_name (String)
41
+ # * :organization_name (String)
42
+ # @param request_options [CandidApiClient::RequestOptions]
43
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
44
+ # @example
45
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
46
+ # 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" })
47
+ def update_referring_provider(encounter_id:, request:, request_options: nil)
48
+ response = @request_client.conn.patch do |req|
49
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
50
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
51
+ req.headers = {
52
+ **(req.headers || {}),
53
+ **@request_client.get_headers,
54
+ **(request_options&.additional_headers || {})
55
+ }.compact
56
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
57
+ req.url "#{@request_client.get_url(environment: CandidApi,
58
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}"
59
+ end
60
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
61
+ end
62
+
63
+ # @param encounter_id [String]
64
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate, as a Hash
65
+ # * :npi (String)
66
+ # * :taxonomy_code (String)
67
+ # * :address (Hash)
68
+ # * :zip_plus_four_code (String)
69
+ # * :address_1 (String)
70
+ # * :address_2 (String)
71
+ # * :city (String)
72
+ # * :state (CandidApiClient::Commons::Types::State)
73
+ # * :zip_code (String)
74
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
75
+ # * :first_name (String)
76
+ # * :last_name (String)
77
+ # * :organization_name (String)
78
+ # @param request_options [CandidApiClient::RequestOptions]
79
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
80
+ # @example
81
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
82
+ # 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" })
83
+ def update_initial_referring_provider(encounter_id:, request:, request_options: nil)
84
+ response = @request_client.conn.patch do |req|
85
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
86
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
87
+ req.headers = {
88
+ **(req.headers || {}),
89
+ **@request_client.get_headers,
90
+ **(request_options&.additional_headers || {})
91
+ }.compact
92
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
93
+ req.url "#{@request_client.get_url(environment: CandidApi,
94
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/initial-referring-provider"
95
+ end
96
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
97
+ end
98
+
99
+ # @param encounter_id [String]
100
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash
101
+ # * :npi (String)
102
+ # * :taxonomy_code (String)
103
+ # * :address (Hash)
104
+ # * :zip_plus_four_code (String)
105
+ # * :address_1 (String)
106
+ # * :address_2 (String)
107
+ # * :city (String)
108
+ # * :state (CandidApiClient::Commons::Types::State)
109
+ # * :zip_code (String)
110
+ # * :first_name (String)
111
+ # * :last_name (String)
112
+ # * :organization_name (String)
113
+ # @param request_options [CandidApiClient::RequestOptions]
114
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
115
+ # @example
116
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
117
+ # 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" })
118
+ def update_supervising_provider(encounter_id:, request:, request_options: nil)
119
+ response = @request_client.conn.patch do |req|
120
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
121
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
122
+ req.headers = {
123
+ **(req.headers || {}),
124
+ **@request_client.get_headers,
125
+ **(request_options&.additional_headers || {})
126
+ }.compact
127
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
128
+ req.url "#{@request_client.get_url(environment: CandidApi,
129
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/supervising-provider"
130
+ end
131
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
132
+ end
133
+
134
+ # @param service_line_id [String]
135
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::OrderingProviderUpdate, as a Hash
136
+ # * :npi (String)
137
+ # * :taxonomy_code (String)
138
+ # * :address (Hash)
139
+ # * :zip_plus_four_code (String)
140
+ # * :address_1 (String)
141
+ # * :address_2 (String)
142
+ # * :city (String)
143
+ # * :state (CandidApiClient::Commons::Types::State)
144
+ # * :zip_code (String)
145
+ # * :first_name (String)
146
+ # * :last_name (String)
147
+ # * :organization_name (String)
148
+ # @param request_options [CandidApiClient::RequestOptions]
149
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
150
+ # @example
151
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
152
+ # 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" })
153
+ def update_ordering_provider(service_line_id:, request:, request_options: nil)
154
+ response = @request_client.conn.patch do |req|
155
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
156
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
157
+ req.headers = {
158
+ **(req.headers || {}),
159
+ **@request_client.get_headers,
160
+ **(request_options&.additional_headers || {})
161
+ }.compact
162
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
163
+ req.url "#{@request_client.get_url(environment: CandidApi,
164
+ request_options: request_options)}/api/encounter-providers/v2/#{service_line_id}/ordering-provider"
165
+ end
166
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
167
+ end
168
+
169
+ # @param encounter_id [String]
170
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProvider, as a Hash
171
+ # * :npi (String)
172
+ # * :taxonomy_code (String)
173
+ # * :address (Hash)
174
+ # * :zip_plus_four_code (String)
175
+ # * :address_1 (String)
176
+ # * :address_2 (String)
177
+ # * :city (String)
178
+ # * :state (CandidApiClient::Commons::Types::State)
179
+ # * :zip_code (String)
180
+ # * :first_name (String)
181
+ # * :last_name (String)
182
+ # * :organization_name (String)
183
+ # @param request_options [CandidApiClient::RequestOptions]
184
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
185
+ # @example
186
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
187
+ # 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" })
188
+ def create_referring_provider(encounter_id:, request:, request_options: nil)
189
+ response = @request_client.conn.post do |req|
190
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
191
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
192
+ req.headers = {
193
+ **(req.headers || {}),
194
+ **@request_client.get_headers,
195
+ **(request_options&.additional_headers || {})
196
+ }.compact
197
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
198
+ req.url "#{@request_client.get_url(environment: CandidApi,
199
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/create-referring-provider"
200
+ end
201
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
202
+ end
203
+
204
+ # @param encounter_id [String]
205
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider, as a Hash
206
+ # * :npi (String)
207
+ # * :taxonomy_code (String)
208
+ # * :address (Hash)
209
+ # * :zip_plus_four_code (String)
210
+ # * :address_1 (String)
211
+ # * :address_2 (String)
212
+ # * :city (String)
213
+ # * :state (CandidApiClient::Commons::Types::State)
214
+ # * :zip_code (String)
215
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
216
+ # * :first_name (String)
217
+ # * :last_name (String)
218
+ # * :organization_name (String)
219
+ # @param request_options [CandidApiClient::RequestOptions]
220
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
221
+ # @example
222
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
223
+ # 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" })
224
+ def create_initial_referring_provider(encounter_id:, request:, request_options: nil)
225
+ response = @request_client.conn.post do |req|
226
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
227
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
228
+ req.headers = {
229
+ **(req.headers || {}),
230
+ **@request_client.get_headers,
231
+ **(request_options&.additional_headers || {})
232
+ }.compact
233
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
234
+ req.url "#{@request_client.get_url(environment: CandidApi,
235
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/create-initial-referring-provider"
236
+ end
237
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
238
+ end
239
+
240
+ # @param encounter_id [String]
241
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider, as a Hash
242
+ # * :npi (String)
243
+ # * :taxonomy_code (String)
244
+ # * :address (Hash)
245
+ # * :zip_plus_four_code (String)
246
+ # * :address_1 (String)
247
+ # * :address_2 (String)
248
+ # * :city (String)
249
+ # * :state (CandidApiClient::Commons::Types::State)
250
+ # * :zip_code (String)
251
+ # * :first_name (String)
252
+ # * :last_name (String)
253
+ # * :organization_name (String)
254
+ # @param request_options [CandidApiClient::RequestOptions]
255
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
256
+ # @example
257
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
258
+ # 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" })
259
+ def create_supervising_provider(encounter_id:, request:, request_options: nil)
260
+ response = @request_client.conn.post do |req|
261
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
262
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
263
+ req.headers = {
264
+ **(req.headers || {}),
265
+ **@request_client.get_headers,
266
+ **(request_options&.additional_headers || {})
267
+ }.compact
268
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
269
+ req.url "#{@request_client.get_url(environment: CandidApi,
270
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/create-supervising-provider"
271
+ end
272
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
273
+ end
274
+
275
+ # @param service_line_id [String]
276
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::OrderingProvider, as a Hash
277
+ # * :npi (String)
278
+ # * :taxonomy_code (String)
279
+ # * :address (Hash)
280
+ # * :zip_plus_four_code (String)
281
+ # * :address_1 (String)
282
+ # * :address_2 (String)
283
+ # * :city (String)
284
+ # * :state (CandidApiClient::Commons::Types::State)
285
+ # * :zip_code (String)
286
+ # * :first_name (String)
287
+ # * :last_name (String)
288
+ # * :organization_name (String)
289
+ # @param request_options [CandidApiClient::RequestOptions]
290
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
291
+ # @example
292
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
293
+ # 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" })
294
+ def create_ordering_provider(service_line_id:, request:, request_options: nil)
295
+ response = @request_client.conn.post do |req|
296
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
297
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
298
+ req.headers = {
299
+ **(req.headers || {}),
300
+ **@request_client.get_headers,
301
+ **(request_options&.additional_headers || {})
302
+ }.compact
303
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
304
+ req.url "#{@request_client.get_url(environment: CandidApi,
305
+ request_options: request_options)}/api/encounter-providers/v2/#{service_line_id}/create-ordering-provider"
306
+ end
307
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
308
+ end
309
+
310
+ # @param encounter_id [String]
311
+ # @param request_options [CandidApiClient::RequestOptions]
312
+ # @return [Void]
313
+ # @example
314
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
315
+ # api.encounter_providers.v_2.delete_referring_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
316
+ def delete_referring_provider(encounter_id:, request_options: nil)
317
+ @request_client.conn.delete do |req|
318
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
319
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
320
+ req.headers = {
321
+ **(req.headers || {}),
322
+ **@request_client.get_headers,
323
+ **(request_options&.additional_headers || {})
324
+ }.compact
325
+ req.url "#{@request_client.get_url(environment: CandidApi,
326
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/referring-provider"
327
+ end
328
+ end
329
+
330
+ # @param encounter_id [String]
331
+ # @param request_options [CandidApiClient::RequestOptions]
332
+ # @return [Void]
333
+ # @example
334
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
335
+ # api.encounter_providers.v_2.delete_initial_referring_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
336
+ def delete_initial_referring_provider(encounter_id:, request_options: nil)
337
+ @request_client.conn.delete do |req|
338
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
339
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
340
+ req.headers = {
341
+ **(req.headers || {}),
342
+ **@request_client.get_headers,
343
+ **(request_options&.additional_headers || {})
344
+ }.compact
345
+ req.url "#{@request_client.get_url(environment: CandidApi,
346
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/initial-referring-provider"
347
+ end
348
+ end
349
+
350
+ # @param encounter_id [String]
351
+ # @param request_options [CandidApiClient::RequestOptions]
352
+ # @return [Void]
353
+ # @example
354
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
355
+ # api.encounter_providers.v_2.delete_supervising_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
356
+ def delete_supervising_provider(encounter_id:, request_options: nil)
357
+ @request_client.conn.delete do |req|
358
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
359
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
360
+ req.headers = {
361
+ **(req.headers || {}),
362
+ **@request_client.get_headers,
363
+ **(request_options&.additional_headers || {})
364
+ }.compact
365
+ req.url "#{@request_client.get_url(environment: CandidApi,
366
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/supervising-provider"
367
+ end
368
+ end
369
+
370
+ # @param service_line_id [String]
371
+ # @param request_options [CandidApiClient::RequestOptions]
372
+ # @return [Void]
373
+ # @example
374
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
375
+ # api.encounter_providers.v_2.delete_ordering_provider(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
376
+ def delete_ordering_provider(service_line_id:, request_options: nil)
377
+ @request_client.conn.delete do |req|
378
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
379
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
380
+ req.headers = {
381
+ **(req.headers || {}),
382
+ **@request_client.get_headers,
383
+ **(request_options&.additional_headers || {})
384
+ }.compact
385
+ req.url "#{@request_client.get_url(environment: CandidApi,
386
+ request_options: request_options)}/api/encounter-providers/v2/#{service_line_id}/ordering-provider"
387
+ end
388
+ end
389
+ end
390
+
391
+ class AsyncV2Client
392
+ # @return [CandidApiClient::AsyncRequestClient]
393
+ attr_reader :request_client
394
+
395
+ # @param request_client [CandidApiClient::AsyncRequestClient]
396
+ # @return [CandidApiClient::EncounterProviders::V2::AsyncV2Client]
397
+ def initialize(request_client:)
398
+ @request_client = request_client
399
+ end
400
+
401
+ # @param encounter_id [String]
402
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate, as a Hash
403
+ # * :npi (String)
404
+ # * :taxonomy_code (String)
405
+ # * :address (Hash)
406
+ # * :zip_plus_four_code (String)
407
+ # * :address_1 (String)
408
+ # * :address_2 (String)
409
+ # * :city (String)
410
+ # * :state (CandidApiClient::Commons::Types::State)
411
+ # * :zip_code (String)
412
+ # * :first_name (String)
413
+ # * :last_name (String)
414
+ # * :organization_name (String)
415
+ # @param request_options [CandidApiClient::RequestOptions]
416
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
417
+ # @example
418
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
419
+ # 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" })
420
+ def update_referring_provider(encounter_id:, request:, request_options: nil)
421
+ Async do
422
+ response = @request_client.conn.patch do |req|
423
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
424
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
425
+ req.headers = {
426
+ **(req.headers || {}),
427
+ **@request_client.get_headers,
428
+ **(request_options&.additional_headers || {})
429
+ }.compact
430
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
431
+ req.url "#{@request_client.get_url(environment: CandidApi,
432
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}"
433
+ end
434
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
435
+ end
436
+ end
437
+
438
+ # @param encounter_id [String]
439
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate, as a Hash
440
+ # * :npi (String)
441
+ # * :taxonomy_code (String)
442
+ # * :address (Hash)
443
+ # * :zip_plus_four_code (String)
444
+ # * :address_1 (String)
445
+ # * :address_2 (String)
446
+ # * :city (String)
447
+ # * :state (CandidApiClient::Commons::Types::State)
448
+ # * :zip_code (String)
449
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
450
+ # * :first_name (String)
451
+ # * :last_name (String)
452
+ # * :organization_name (String)
453
+ # @param request_options [CandidApiClient::RequestOptions]
454
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
455
+ # @example
456
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
457
+ # 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" })
458
+ def update_initial_referring_provider(encounter_id:, request:, request_options: nil)
459
+ Async do
460
+ response = @request_client.conn.patch do |req|
461
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
462
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
463
+ req.headers = {
464
+ **(req.headers || {}),
465
+ **@request_client.get_headers,
466
+ **(request_options&.additional_headers || {})
467
+ }.compact
468
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
469
+ req.url "#{@request_client.get_url(environment: CandidApi,
470
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/initial-referring-provider"
471
+ end
472
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
473
+ end
474
+ end
475
+
476
+ # @param encounter_id [String]
477
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash
478
+ # * :npi (String)
479
+ # * :taxonomy_code (String)
480
+ # * :address (Hash)
481
+ # * :zip_plus_four_code (String)
482
+ # * :address_1 (String)
483
+ # * :address_2 (String)
484
+ # * :city (String)
485
+ # * :state (CandidApiClient::Commons::Types::State)
486
+ # * :zip_code (String)
487
+ # * :first_name (String)
488
+ # * :last_name (String)
489
+ # * :organization_name (String)
490
+ # @param request_options [CandidApiClient::RequestOptions]
491
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
492
+ # @example
493
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
494
+ # 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" })
495
+ def update_supervising_provider(encounter_id:, request:, request_options: nil)
496
+ Async do
497
+ response = @request_client.conn.patch do |req|
498
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
499
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
500
+ req.headers = {
501
+ **(req.headers || {}),
502
+ **@request_client.get_headers,
503
+ **(request_options&.additional_headers || {})
504
+ }.compact
505
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
506
+ req.url "#{@request_client.get_url(environment: CandidApi,
507
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/supervising-provider"
508
+ end
509
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
510
+ end
511
+ end
512
+
513
+ # @param service_line_id [String]
514
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::OrderingProviderUpdate, as a Hash
515
+ # * :npi (String)
516
+ # * :taxonomy_code (String)
517
+ # * :address (Hash)
518
+ # * :zip_plus_four_code (String)
519
+ # * :address_1 (String)
520
+ # * :address_2 (String)
521
+ # * :city (String)
522
+ # * :state (CandidApiClient::Commons::Types::State)
523
+ # * :zip_code (String)
524
+ # * :first_name (String)
525
+ # * :last_name (String)
526
+ # * :organization_name (String)
527
+ # @param request_options [CandidApiClient::RequestOptions]
528
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
529
+ # @example
530
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
531
+ # 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" })
532
+ def update_ordering_provider(service_line_id:, request:, request_options: nil)
533
+ Async do
534
+ response = @request_client.conn.patch do |req|
535
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
536
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
537
+ req.headers = {
538
+ **(req.headers || {}),
539
+ **@request_client.get_headers,
540
+ **(request_options&.additional_headers || {})
541
+ }.compact
542
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
543
+ req.url "#{@request_client.get_url(environment: CandidApi,
544
+ request_options: request_options)}/api/encounter-providers/v2/#{service_line_id}/ordering-provider"
545
+ end
546
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
547
+ end
548
+ end
549
+
550
+ # @param encounter_id [String]
551
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProvider, as a Hash
552
+ # * :npi (String)
553
+ # * :taxonomy_code (String)
554
+ # * :address (Hash)
555
+ # * :zip_plus_four_code (String)
556
+ # * :address_1 (String)
557
+ # * :address_2 (String)
558
+ # * :city (String)
559
+ # * :state (CandidApiClient::Commons::Types::State)
560
+ # * :zip_code (String)
561
+ # * :first_name (String)
562
+ # * :last_name (String)
563
+ # * :organization_name (String)
564
+ # @param request_options [CandidApiClient::RequestOptions]
565
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
566
+ # @example
567
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
568
+ # 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" })
569
+ def create_referring_provider(encounter_id:, request:, request_options: nil)
570
+ Async do
571
+ response = @request_client.conn.post do |req|
572
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
573
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
574
+ req.headers = {
575
+ **(req.headers || {}),
576
+ **@request_client.get_headers,
577
+ **(request_options&.additional_headers || {})
578
+ }.compact
579
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
580
+ req.url "#{@request_client.get_url(environment: CandidApi,
581
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/create-referring-provider"
582
+ end
583
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
584
+ end
585
+ end
586
+
587
+ # @param encounter_id [String]
588
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider, as a Hash
589
+ # * :npi (String)
590
+ # * :taxonomy_code (String)
591
+ # * :address (Hash)
592
+ # * :zip_plus_four_code (String)
593
+ # * :address_1 (String)
594
+ # * :address_2 (String)
595
+ # * :city (String)
596
+ # * :state (CandidApiClient::Commons::Types::State)
597
+ # * :zip_code (String)
598
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
599
+ # * :first_name (String)
600
+ # * :last_name (String)
601
+ # * :organization_name (String)
602
+ # @param request_options [CandidApiClient::RequestOptions]
603
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
604
+ # @example
605
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
606
+ # 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" })
607
+ def create_initial_referring_provider(encounter_id:, request:, request_options: nil)
608
+ Async do
609
+ response = @request_client.conn.post do |req|
610
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
611
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
612
+ req.headers = {
613
+ **(req.headers || {}),
614
+ **@request_client.get_headers,
615
+ **(request_options&.additional_headers || {})
616
+ }.compact
617
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
618
+ req.url "#{@request_client.get_url(environment: CandidApi,
619
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/create-initial-referring-provider"
620
+ end
621
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
622
+ end
623
+ end
624
+
625
+ # @param encounter_id [String]
626
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider, as a Hash
627
+ # * :npi (String)
628
+ # * :taxonomy_code (String)
629
+ # * :address (Hash)
630
+ # * :zip_plus_four_code (String)
631
+ # * :address_1 (String)
632
+ # * :address_2 (String)
633
+ # * :city (String)
634
+ # * :state (CandidApiClient::Commons::Types::State)
635
+ # * :zip_code (String)
636
+ # * :first_name (String)
637
+ # * :last_name (String)
638
+ # * :organization_name (String)
639
+ # @param request_options [CandidApiClient::RequestOptions]
640
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
641
+ # @example
642
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
643
+ # 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" })
644
+ def create_supervising_provider(encounter_id:, request:, request_options: nil)
645
+ Async do
646
+ response = @request_client.conn.post do |req|
647
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
648
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
649
+ req.headers = {
650
+ **(req.headers || {}),
651
+ **@request_client.get_headers,
652
+ **(request_options&.additional_headers || {})
653
+ }.compact
654
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
655
+ req.url "#{@request_client.get_url(environment: CandidApi,
656
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/create-supervising-provider"
657
+ end
658
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
659
+ end
660
+ end
661
+
662
+ # @param service_line_id [String]
663
+ # @param request [Hash] Request of type CandidApiClient::EncounterProviders::V2::Types::OrderingProvider, as a Hash
664
+ # * :npi (String)
665
+ # * :taxonomy_code (String)
666
+ # * :address (Hash)
667
+ # * :zip_plus_four_code (String)
668
+ # * :address_1 (String)
669
+ # * :address_2 (String)
670
+ # * :city (String)
671
+ # * :state (CandidApiClient::Commons::Types::State)
672
+ # * :zip_code (String)
673
+ # * :first_name (String)
674
+ # * :last_name (String)
675
+ # * :organization_name (String)
676
+ # @param request_options [CandidApiClient::RequestOptions]
677
+ # @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
678
+ # @example
679
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
680
+ # 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" })
681
+ def create_ordering_provider(service_line_id:, request:, request_options: nil)
682
+ Async do
683
+ response = @request_client.conn.post do |req|
684
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
685
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
686
+ req.headers = {
687
+ **(req.headers || {}),
688
+ **@request_client.get_headers,
689
+ **(request_options&.additional_headers || {})
690
+ }.compact
691
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
692
+ req.url "#{@request_client.get_url(environment: CandidApi,
693
+ request_options: request_options)}/api/encounter-providers/v2/#{service_line_id}/create-ordering-provider"
694
+ end
695
+ CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: response.body)
696
+ end
697
+ end
698
+
699
+ # @param encounter_id [String]
700
+ # @param request_options [CandidApiClient::RequestOptions]
701
+ # @return [Void]
702
+ # @example
703
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
704
+ # api.encounter_providers.v_2.delete_referring_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
705
+ def delete_referring_provider(encounter_id:, request_options: nil)
706
+ Async do
707
+ @request_client.conn.delete do |req|
708
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
709
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
710
+ req.headers = {
711
+ **(req.headers || {}),
712
+ **@request_client.get_headers,
713
+ **(request_options&.additional_headers || {})
714
+ }.compact
715
+ req.url "#{@request_client.get_url(environment: CandidApi,
716
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/referring-provider"
717
+ end
718
+ end
719
+ end
720
+
721
+ # @param encounter_id [String]
722
+ # @param request_options [CandidApiClient::RequestOptions]
723
+ # @return [Void]
724
+ # @example
725
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
726
+ # api.encounter_providers.v_2.delete_initial_referring_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
727
+ def delete_initial_referring_provider(encounter_id:, request_options: nil)
728
+ Async do
729
+ @request_client.conn.delete do |req|
730
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
731
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
732
+ req.headers = {
733
+ **(req.headers || {}),
734
+ **@request_client.get_headers,
735
+ **(request_options&.additional_headers || {})
736
+ }.compact
737
+ req.url "#{@request_client.get_url(environment: CandidApi,
738
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/initial-referring-provider"
739
+ end
740
+ end
741
+ end
742
+
743
+ # @param encounter_id [String]
744
+ # @param request_options [CandidApiClient::RequestOptions]
745
+ # @return [Void]
746
+ # @example
747
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
748
+ # api.encounter_providers.v_2.delete_supervising_provider(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
749
+ def delete_supervising_provider(encounter_id:, request_options: nil)
750
+ Async do
751
+ @request_client.conn.delete do |req|
752
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
753
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
754
+ req.headers = {
755
+ **(req.headers || {}),
756
+ **@request_client.get_headers,
757
+ **(request_options&.additional_headers || {})
758
+ }.compact
759
+ req.url "#{@request_client.get_url(environment: CandidApi,
760
+ request_options: request_options)}/api/encounter-providers/v2/#{encounter_id}/supervising-provider"
761
+ end
762
+ end
763
+ end
764
+
765
+ # @param service_line_id [String]
766
+ # @param request_options [CandidApiClient::RequestOptions]
767
+ # @return [Void]
768
+ # @example
769
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
770
+ # api.encounter_providers.v_2.delete_ordering_provider(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
771
+ def delete_ordering_provider(service_line_id:, request_options: nil)
772
+ Async do
773
+ @request_client.conn.delete do |req|
774
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
775
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
776
+ req.headers = {
777
+ **(req.headers || {}),
778
+ **@request_client.get_headers,
779
+ **(request_options&.additional_headers || {})
780
+ }.compact
781
+ req.url "#{@request_client.get_url(environment: CandidApi,
782
+ request_options: request_options)}/api/encounter-providers/v2/#{service_line_id}/ordering-provider"
783
+ end
784
+ end
785
+ end
786
+ end
787
+ end
788
+ end
789
+ end