candidhealth 0.36.1 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1254 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../requests"
4
+ require_relative "types/charge_capture_data"
5
+ require_relative "types/charge_capture_status"
6
+ require_relative "types/charge_capture"
7
+ require_relative "types/charge_capture_page"
8
+ require "async"
9
+
10
+ module CandidApiClient
11
+ module ChargeCapture
12
+ module V1
13
+ class V1Client
14
+ # @return [CandidApiClient::RequestClient]
15
+ attr_reader :request_client
16
+
17
+ # @param request_client [CandidApiClient::RequestClient]
18
+ # @return [CandidApiClient::ChargeCapture::V1::V1Client]
19
+ def initialize(request_client:)
20
+ @request_client = request_client
21
+ end
22
+
23
+ # @param data [Hash] Charge Capture data contains all the fields needed to create an encounter, but
24
+ # listed as optional. Candid will use this data when attempting to bundle multiple
25
+ # Charge Captures into a single encounter.Request of type CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData, as a Hash
26
+ # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
27
+ # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
28
+ # * :external_claim_submission (Hash)
29
+ # * :claim_created_at (DateTime)
30
+ # * :patient_control_number (String)
31
+ # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
32
+ # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
33
+ # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
34
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNote>)
35
+ # * :benefits_assigned_to_provider (Boolean)
36
+ # * :prior_authorization_number (String)
37
+ # * :external_id (String)
38
+ # * :date_of_service (Date)
39
+ # * :tag_ids (Array<String>)
40
+ # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
41
+ # * :pay_to_address (Hash)
42
+ # * :zip_plus_four_code (String)
43
+ # * :address_1 (String)
44
+ # * :address_2 (String)
45
+ # * :city (String)
46
+ # * :state (CandidApiClient::Commons::Types::State)
47
+ # * :zip_code (String)
48
+ # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
49
+ # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
50
+ # * :provider_accepts_assignment (Boolean)
51
+ # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
52
+ # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
53
+ # * :appointment_type (String)
54
+ # * :end_date_of_service (Date)
55
+ # * :subscriber_primary (Hash)
56
+ # * :insurance_card (Hash)
57
+ # * :member_id (String)
58
+ # * :payer_name (String)
59
+ # * :payer_id (String)
60
+ # * :rx_bin (String)
61
+ # * :rx_pcn (String)
62
+ # * :image_url_front (String)
63
+ # * :image_url_back (String)
64
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
65
+ # * :group_number (String)
66
+ # * :plan_name (String)
67
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
68
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
69
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
70
+ # * :date_of_birth (Date)
71
+ # * :address (Hash)
72
+ # * :zip_plus_four_code (String)
73
+ # * :address_1 (String)
74
+ # * :address_2 (String)
75
+ # * :city (String)
76
+ # * :state (CandidApiClient::Commons::Types::State)
77
+ # * :zip_code (String)
78
+ # * :first_name (String)
79
+ # * :last_name (String)
80
+ # * :gender (CandidApiClient::Individual::Types::Gender)
81
+ # * :subscriber_secondary (Hash)
82
+ # * :insurance_card (Hash)
83
+ # * :member_id (String)
84
+ # * :payer_name (String)
85
+ # * :payer_id (String)
86
+ # * :rx_bin (String)
87
+ # * :rx_pcn (String)
88
+ # * :image_url_front (String)
89
+ # * :image_url_back (String)
90
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
91
+ # * :group_number (String)
92
+ # * :plan_name (String)
93
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
94
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
95
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
96
+ # * :date_of_birth (Date)
97
+ # * :address (Hash)
98
+ # * :zip_plus_four_code (String)
99
+ # * :address_1 (String)
100
+ # * :address_2 (String)
101
+ # * :city (String)
102
+ # * :state (CandidApiClient::Commons::Types::State)
103
+ # * :zip_code (String)
104
+ # * :first_name (String)
105
+ # * :last_name (String)
106
+ # * :gender (CandidApiClient::Individual::Types::Gender)
107
+ # * :additional_information (String)
108
+ # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
109
+ # * :admission_date (Date)
110
+ # * :discharge_date (Date)
111
+ # * :onset_of_current_illness_or_symptom_date (Date)
112
+ # * :last_menstrual_period_date (Date)
113
+ # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
114
+ # * :patient (Hash)
115
+ # * :first_name (String)
116
+ # * :last_name (String)
117
+ # * :gender (CandidApiClient::Individual::Types::Gender)
118
+ # * :external_id (String)
119
+ # * :date_of_birth (Date)
120
+ # * :address (Hash)
121
+ # * :zip_plus_four_code (String)
122
+ # * :address_1 (String)
123
+ # * :address_2 (String)
124
+ # * :city (String)
125
+ # * :state (CandidApiClient::Commons::Types::State)
126
+ # * :zip_code (String)
127
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
128
+ # * :phone_consent (Boolean)
129
+ # * :email (String)
130
+ # * :email_consent (Boolean)
131
+ # * :non_insurance_payers (Array<String>)
132
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
133
+ # * :patient_authorized_release (Boolean)
134
+ # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
135
+ # * :vitals (Hash)
136
+ # * :height_in (Integer)
137
+ # * :weight_lbs (Integer)
138
+ # * :blood_pressure_systolic_mmhg (Integer)
139
+ # * :blood_pressure_diastolic_mmhg (Integer)
140
+ # * :body_temperature_f (Float)
141
+ # * :hemoglobin_gdl (Float)
142
+ # * :hematocrit_pct (Float)
143
+ # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
144
+ # * :rendering_provider (Hash)
145
+ # * :npi (String)
146
+ # * :taxonomy_code (String)
147
+ # * :address (Hash)
148
+ # * :zip_plus_four_code (String)
149
+ # * :address_1 (String)
150
+ # * :address_2 (String)
151
+ # * :city (String)
152
+ # * :state (CandidApiClient::Commons::Types::State)
153
+ # * :zip_code (String)
154
+ # * :first_name (String)
155
+ # * :last_name (String)
156
+ # * :organization_name (String)
157
+ # * :service_facility (Hash)
158
+ # * :organization_name (String)
159
+ # * :npi (String)
160
+ # * :address (Hash)
161
+ # * :zip_plus_four_code (String)
162
+ # * :address_1 (String)
163
+ # * :address_2 (String)
164
+ # * :city (String)
165
+ # * :state (CandidApiClient::Commons::Types::State)
166
+ # * :zip_code (String)
167
+ # * :secondary_identification (String)
168
+ # * :guarantor (Hash)
169
+ # * :first_name (String)
170
+ # * :last_name (String)
171
+ # * :external_id (String)
172
+ # * :date_of_birth (Date)
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
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
181
+ # * :phone_consent (Boolean)
182
+ # * :email (String)
183
+ # * :email_consent (Boolean)
184
+ # * :billing_provider (Hash)
185
+ # * :address (Hash)
186
+ # * :zip_plus_four_code (String)
187
+ # * :address_1 (String)
188
+ # * :address_2 (String)
189
+ # * :city (String)
190
+ # * :state (CandidApiClient::Commons::Types::State)
191
+ # * :zip_code (String)
192
+ # * :tax_id (String)
193
+ # * :npi (String)
194
+ # * :taxonomy_code (String)
195
+ # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
196
+ # * :first_name (String)
197
+ # * :last_name (String)
198
+ # * :organization_name (String)
199
+ # * :supervising_provider (Hash)
200
+ # * :npi (String)
201
+ # * :taxonomy_code (String)
202
+ # * :address (Hash)
203
+ # * :zip_plus_four_code (String)
204
+ # * :address_1 (String)
205
+ # * :address_2 (String)
206
+ # * :city (String)
207
+ # * :state (CandidApiClient::Commons::Types::State)
208
+ # * :zip_code (String)
209
+ # * :first_name (String)
210
+ # * :last_name (String)
211
+ # * :organization_name (String)
212
+ # * :referring_provider (Hash)
213
+ # * :npi (String)
214
+ # * :taxonomy_code (String)
215
+ # * :address (Hash)
216
+ # * :zip_plus_four_code (String)
217
+ # * :address_1 (String)
218
+ # * :address_2 (String)
219
+ # * :city (String)
220
+ # * :state (CandidApiClient::Commons::Types::State)
221
+ # * :zip_code (String)
222
+ # * :first_name (String)
223
+ # * :last_name (String)
224
+ # * :organization_name (String)
225
+ # * :initial_referring_provider (Hash)
226
+ # * :npi (String)
227
+ # * :taxonomy_code (String)
228
+ # * :address (Hash)
229
+ # * :zip_plus_four_code (String)
230
+ # * :address_1 (String)
231
+ # * :address_2 (String)
232
+ # * :city (String)
233
+ # * :state (CandidApiClient::Commons::Types::State)
234
+ # * :zip_code (String)
235
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
236
+ # * :first_name (String)
237
+ # * :last_name (String)
238
+ # * :organization_name (String)
239
+ # * :referral_number (String)
240
+ # @param encounter_external_id [String] A client-specified unique ID to associate with this encounter; for example, your
241
+ # internal encounter ID or a Dr. Chrono encounter ID. This field should not
242
+ # contain PHI.
243
+ # @param ehr_source_url [String] External URL reference that links to Charge Capture details within the external
244
+ # system (e.g. the EHR visit page). Send full URL format for the external link
245
+ # (e.g. https://emr_charge_capture_url.com/123).
246
+ # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
247
+ # @param status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge capture
248
+ # @param request_options [CandidApiClient::RequestOptions]
249
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapture]
250
+ # @example
251
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
252
+ # api.charge_capture.v_1.create(
253
+ # data: { diagnoses: , interventions: , external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] }, service_lines: , patient_histories: , billing_notes: , benefits_assigned_to_provider: true, prior_authorization_number: "string", external_id: "string", date_of_service: DateTime.parse(2023-01-15), tag_ids: , clinical_notes: , pay_to_address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, billable_status: BILLABLE, responsible_party: INSURANCE_PAY, provider_accepts_assignment: true, synchronicity: SYNCHRONOUS, place_of_service_code: PHARMACY, appointment_type: "string", end_date_of_service: DateTime.parse(2023-01-15), subscriber_primary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string" }, patient_relationship_to_subscriber_code: SPOUSE, first_name: "string", last_name: "string", gender: MALE }, subscriber_secondary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string" }, patient_relationship_to_subscriber_code: SPOUSE, first_name: "string", last_name: "string", gender: MALE }, additional_information: "string", service_authorization_exception_code: C_1, admission_date: DateTime.parse(2023-01-15), discharge_date: DateTime.parse(2023-01-15), onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15), last_menstrual_period_date: DateTime.parse(2023-01-15), delay_reason_code: C_1, patient: { }, patient_authorized_release: true, schema_instances: , vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 }, existing_medications: , rendering_provider: { }, service_facility: { organization_name: "Test Organization", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } }, guarantor: { }, billing_provider: { }, supervising_provider: { }, referring_provider: { }, initial_referring_provider: { }, referral_number: "string" },
254
+ # encounter_external_id: "string",
255
+ # ehr_source_url: "string",
256
+ # patient_external_id: "string",
257
+ # status: PLANNED
258
+ # )
259
+ def create(data:, encounter_external_id:, patient_external_id:, status:, ehr_source_url: nil,
260
+ request_options: nil)
261
+ response = @request_client.conn.post do |req|
262
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
263
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
264
+ req.headers = {
265
+ **(req.headers || {}),
266
+ **@request_client.get_headers,
267
+ **(request_options&.additional_headers || {})
268
+ }.compact
269
+ req.body = {
270
+ **(request_options&.additional_body_parameters || {}),
271
+ data: data,
272
+ encounter_external_id: encounter_external_id,
273
+ ehr_source_url: ehr_source_url,
274
+ patient_external_id: patient_external_id,
275
+ status: status
276
+ }.compact
277
+ req.url "#{@request_client.get_url(environment: CandidApi,
278
+ request_options: request_options)}/api/charge_captures/v1"
279
+ end
280
+ CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: response.body)
281
+ end
282
+
283
+ # @param charge_capture_id [String]
284
+ # @param request_options [CandidApiClient::RequestOptions]
285
+ # @return [Void]
286
+ # @example
287
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
288
+ # api.charge_capture.v_1.delete(charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
289
+ def delete(charge_capture_id:, request_options: nil)
290
+ @request_client.conn.delete do |req|
291
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
292
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
293
+ req.headers = {
294
+ **(req.headers || {}),
295
+ **@request_client.get_headers,
296
+ **(request_options&.additional_headers || {})
297
+ }.compact
298
+ req.url "#{@request_client.get_url(environment: CandidApi,
299
+ request_options: request_options)}/api/charge_captures/v1/#{charge_capture_id}"
300
+ end
301
+ end
302
+
303
+ # @param charge_capture_id [String]
304
+ # @param data [Hash] Request of type CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData, as a Hash
305
+ # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
306
+ # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
307
+ # * :external_claim_submission (Hash)
308
+ # * :claim_created_at (DateTime)
309
+ # * :patient_control_number (String)
310
+ # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
311
+ # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
312
+ # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
313
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNote>)
314
+ # * :benefits_assigned_to_provider (Boolean)
315
+ # * :prior_authorization_number (String)
316
+ # * :external_id (String)
317
+ # * :date_of_service (Date)
318
+ # * :tag_ids (Array<String>)
319
+ # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
320
+ # * :pay_to_address (Hash)
321
+ # * :zip_plus_four_code (String)
322
+ # * :address_1 (String)
323
+ # * :address_2 (String)
324
+ # * :city (String)
325
+ # * :state (CandidApiClient::Commons::Types::State)
326
+ # * :zip_code (String)
327
+ # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
328
+ # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
329
+ # * :provider_accepts_assignment (Boolean)
330
+ # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
331
+ # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
332
+ # * :appointment_type (String)
333
+ # * :end_date_of_service (Date)
334
+ # * :subscriber_primary (Hash)
335
+ # * :insurance_card (Hash)
336
+ # * :member_id (String)
337
+ # * :payer_name (String)
338
+ # * :payer_id (String)
339
+ # * :rx_bin (String)
340
+ # * :rx_pcn (String)
341
+ # * :image_url_front (String)
342
+ # * :image_url_back (String)
343
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
344
+ # * :group_number (String)
345
+ # * :plan_name (String)
346
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
347
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
348
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
349
+ # * :date_of_birth (Date)
350
+ # * :address (Hash)
351
+ # * :zip_plus_four_code (String)
352
+ # * :address_1 (String)
353
+ # * :address_2 (String)
354
+ # * :city (String)
355
+ # * :state (CandidApiClient::Commons::Types::State)
356
+ # * :zip_code (String)
357
+ # * :first_name (String)
358
+ # * :last_name (String)
359
+ # * :gender (CandidApiClient::Individual::Types::Gender)
360
+ # * :subscriber_secondary (Hash)
361
+ # * :insurance_card (Hash)
362
+ # * :member_id (String)
363
+ # * :payer_name (String)
364
+ # * :payer_id (String)
365
+ # * :rx_bin (String)
366
+ # * :rx_pcn (String)
367
+ # * :image_url_front (String)
368
+ # * :image_url_back (String)
369
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
370
+ # * :group_number (String)
371
+ # * :plan_name (String)
372
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
373
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
374
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
375
+ # * :date_of_birth (Date)
376
+ # * :address (Hash)
377
+ # * :zip_plus_four_code (String)
378
+ # * :address_1 (String)
379
+ # * :address_2 (String)
380
+ # * :city (String)
381
+ # * :state (CandidApiClient::Commons::Types::State)
382
+ # * :zip_code (String)
383
+ # * :first_name (String)
384
+ # * :last_name (String)
385
+ # * :gender (CandidApiClient::Individual::Types::Gender)
386
+ # * :additional_information (String)
387
+ # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
388
+ # * :admission_date (Date)
389
+ # * :discharge_date (Date)
390
+ # * :onset_of_current_illness_or_symptom_date (Date)
391
+ # * :last_menstrual_period_date (Date)
392
+ # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
393
+ # * :patient (Hash)
394
+ # * :first_name (String)
395
+ # * :last_name (String)
396
+ # * :gender (CandidApiClient::Individual::Types::Gender)
397
+ # * :external_id (String)
398
+ # * :date_of_birth (Date)
399
+ # * :address (Hash)
400
+ # * :zip_plus_four_code (String)
401
+ # * :address_1 (String)
402
+ # * :address_2 (String)
403
+ # * :city (String)
404
+ # * :state (CandidApiClient::Commons::Types::State)
405
+ # * :zip_code (String)
406
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
407
+ # * :phone_consent (Boolean)
408
+ # * :email (String)
409
+ # * :email_consent (Boolean)
410
+ # * :non_insurance_payers (Array<String>)
411
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
412
+ # * :patient_authorized_release (Boolean)
413
+ # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
414
+ # * :vitals (Hash)
415
+ # * :height_in (Integer)
416
+ # * :weight_lbs (Integer)
417
+ # * :blood_pressure_systolic_mmhg (Integer)
418
+ # * :blood_pressure_diastolic_mmhg (Integer)
419
+ # * :body_temperature_f (Float)
420
+ # * :hemoglobin_gdl (Float)
421
+ # * :hematocrit_pct (Float)
422
+ # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
423
+ # * :rendering_provider (Hash)
424
+ # * :npi (String)
425
+ # * :taxonomy_code (String)
426
+ # * :address (Hash)
427
+ # * :zip_plus_four_code (String)
428
+ # * :address_1 (String)
429
+ # * :address_2 (String)
430
+ # * :city (String)
431
+ # * :state (CandidApiClient::Commons::Types::State)
432
+ # * :zip_code (String)
433
+ # * :first_name (String)
434
+ # * :last_name (String)
435
+ # * :organization_name (String)
436
+ # * :service_facility (Hash)
437
+ # * :organization_name (String)
438
+ # * :npi (String)
439
+ # * :address (Hash)
440
+ # * :zip_plus_four_code (String)
441
+ # * :address_1 (String)
442
+ # * :address_2 (String)
443
+ # * :city (String)
444
+ # * :state (CandidApiClient::Commons::Types::State)
445
+ # * :zip_code (String)
446
+ # * :secondary_identification (String)
447
+ # * :guarantor (Hash)
448
+ # * :first_name (String)
449
+ # * :last_name (String)
450
+ # * :external_id (String)
451
+ # * :date_of_birth (Date)
452
+ # * :address (Hash)
453
+ # * :zip_plus_four_code (String)
454
+ # * :address_1 (String)
455
+ # * :address_2 (String)
456
+ # * :city (String)
457
+ # * :state (CandidApiClient::Commons::Types::State)
458
+ # * :zip_code (String)
459
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
460
+ # * :phone_consent (Boolean)
461
+ # * :email (String)
462
+ # * :email_consent (Boolean)
463
+ # * :billing_provider (Hash)
464
+ # * :address (Hash)
465
+ # * :zip_plus_four_code (String)
466
+ # * :address_1 (String)
467
+ # * :address_2 (String)
468
+ # * :city (String)
469
+ # * :state (CandidApiClient::Commons::Types::State)
470
+ # * :zip_code (String)
471
+ # * :tax_id (String)
472
+ # * :npi (String)
473
+ # * :taxonomy_code (String)
474
+ # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
475
+ # * :first_name (String)
476
+ # * :last_name (String)
477
+ # * :organization_name (String)
478
+ # * :supervising_provider (Hash)
479
+ # * :npi (String)
480
+ # * :taxonomy_code (String)
481
+ # * :address (Hash)
482
+ # * :zip_plus_four_code (String)
483
+ # * :address_1 (String)
484
+ # * :address_2 (String)
485
+ # * :city (String)
486
+ # * :state (CandidApiClient::Commons::Types::State)
487
+ # * :zip_code (String)
488
+ # * :first_name (String)
489
+ # * :last_name (String)
490
+ # * :organization_name (String)
491
+ # * :referring_provider (Hash)
492
+ # * :npi (String)
493
+ # * :taxonomy_code (String)
494
+ # * :address (Hash)
495
+ # * :zip_plus_four_code (String)
496
+ # * :address_1 (String)
497
+ # * :address_2 (String)
498
+ # * :city (String)
499
+ # * :state (CandidApiClient::Commons::Types::State)
500
+ # * :zip_code (String)
501
+ # * :first_name (String)
502
+ # * :last_name (String)
503
+ # * :organization_name (String)
504
+ # * :initial_referring_provider (Hash)
505
+ # * :npi (String)
506
+ # * :taxonomy_code (String)
507
+ # * :address (Hash)
508
+ # * :zip_plus_four_code (String)
509
+ # * :address_1 (String)
510
+ # * :address_2 (String)
511
+ # * :city (String)
512
+ # * :state (CandidApiClient::Commons::Types::State)
513
+ # * :zip_code (String)
514
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
515
+ # * :first_name (String)
516
+ # * :last_name (String)
517
+ # * :organization_name (String)
518
+ # * :referral_number (String)
519
+ # @param encounter_external_id [String] A client-specified unique ID to associate with this encounter;
520
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
521
+ # This field should not contain PHI.
522
+ # @param ehr_source_url [String] External URL reference that links to Charge Capture details within the external
523
+ # system (e.g. the EHR visit page).
524
+ # Send full URL format for the external link (e.g.
525
+ # https://emr_charge_capture_url.com/123).
526
+ # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
527
+ # @param status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge capture
528
+ # @param request_options [CandidApiClient::RequestOptions]
529
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapture]
530
+ # @example
531
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
532
+ # api.charge_capture.v_1.update(
533
+ # charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
534
+ # data: { diagnoses: , interventions: , external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] }, service_lines: , patient_histories: , billing_notes: , benefits_assigned_to_provider: true, prior_authorization_number: "string", external_id: "string", date_of_service: DateTime.parse(2023-01-15), tag_ids: , clinical_notes: , pay_to_address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, billable_status: BILLABLE, responsible_party: INSURANCE_PAY, provider_accepts_assignment: true, synchronicity: SYNCHRONOUS, place_of_service_code: PHARMACY, appointment_type: "string", end_date_of_service: DateTime.parse(2023-01-15), subscriber_primary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string" }, patient_relationship_to_subscriber_code: SPOUSE, first_name: "string", last_name: "string", gender: MALE }, subscriber_secondary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string" }, patient_relationship_to_subscriber_code: SPOUSE, first_name: "string", last_name: "string", gender: MALE }, additional_information: "string", service_authorization_exception_code: C_1, admission_date: DateTime.parse(2023-01-15), discharge_date: DateTime.parse(2023-01-15), onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15), last_menstrual_period_date: DateTime.parse(2023-01-15), delay_reason_code: C_1, patient: { }, patient_authorized_release: true, schema_instances: , vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 }, existing_medications: , rendering_provider: { }, service_facility: { organization_name: "Test Organization", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } }, guarantor: { }, billing_provider: { }, supervising_provider: { }, referring_provider: { }, initial_referring_provider: { }, referral_number: "string" },
535
+ # encounter_external_id: "string",
536
+ # ehr_source_url: "string",
537
+ # patient_external_id: "string",
538
+ # status: PLANNED
539
+ # )
540
+ def update(charge_capture_id:, data: nil, encounter_external_id: nil, ehr_source_url: nil,
541
+ patient_external_id: nil, status: nil, request_options: nil)
542
+ response = @request_client.conn.patch do |req|
543
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
544
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
545
+ req.headers = {
546
+ **(req.headers || {}),
547
+ **@request_client.get_headers,
548
+ **(request_options&.additional_headers || {})
549
+ }.compact
550
+ req.body = {
551
+ **(request_options&.additional_body_parameters || {}),
552
+ data: data,
553
+ encounter_external_id: encounter_external_id,
554
+ ehr_source_url: ehr_source_url,
555
+ patient_external_id: patient_external_id,
556
+ status: status
557
+ }.compact
558
+ req.url "#{@request_client.get_url(environment: CandidApi,
559
+ request_options: request_options)}/api/charge_captures/v1/#{charge_capture_id}"
560
+ end
561
+ CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: response.body)
562
+ end
563
+
564
+ # @param charge_capture_id [String]
565
+ # @param request_options [CandidApiClient::RequestOptions]
566
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapture]
567
+ # @example
568
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
569
+ # api.charge_capture.v_1.get(charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
570
+ def get(charge_capture_id:, request_options: nil)
571
+ response = @request_client.conn.get 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.url "#{@request_client.get_url(environment: CandidApi,
580
+ request_options: request_options)}/api/charge_captures/v1/#{charge_capture_id}"
581
+ end
582
+ CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: response.body)
583
+ end
584
+
585
+ # @param limit [Integer] Maximum number of entities per page, defaults to 100.
586
+ # @param page_token [String]
587
+ # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
588
+ # @param status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge captures
589
+ # @param external_id [String] A client-specified unique ID to associate with this encounter;
590
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
591
+ # This field should not contain PHI.
592
+ # @param request_options [CandidApiClient::RequestOptions]
593
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePage]
594
+ # @example
595
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
596
+ # api.charge_capture.v_1.get_all(
597
+ # limit: 1,
598
+ # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
599
+ # patient_external_id: "string",
600
+ # status: PLANNED,
601
+ # external_id: "string"
602
+ # )
603
+ def get_all(limit: nil, page_token: nil, patient_external_id: nil, status: nil, external_id: nil,
604
+ request_options: nil)
605
+ response = @request_client.conn.get do |req|
606
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
607
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
608
+ req.headers = {
609
+ **(req.headers || {}),
610
+ **@request_client.get_headers,
611
+ **(request_options&.additional_headers || {})
612
+ }.compact
613
+ req.params = {
614
+ **(request_options&.additional_query_parameters || {}),
615
+ "limit": limit,
616
+ "page_token": page_token,
617
+ "patient_external_id": patient_external_id,
618
+ "status": status,
619
+ "external_id": external_id
620
+ }.compact
621
+ req.url "#{@request_client.get_url(environment: CandidApi,
622
+ request_options: request_options)}/api/charge_captures/v1"
623
+ end
624
+ CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePage.from_json(json_object: response.body)
625
+ end
626
+ end
627
+
628
+ class AsyncV1Client
629
+ # @return [CandidApiClient::AsyncRequestClient]
630
+ attr_reader :request_client
631
+
632
+ # @param request_client [CandidApiClient::AsyncRequestClient]
633
+ # @return [CandidApiClient::ChargeCapture::V1::AsyncV1Client]
634
+ def initialize(request_client:)
635
+ @request_client = request_client
636
+ end
637
+
638
+ # @param data [Hash] Charge Capture data contains all the fields needed to create an encounter, but
639
+ # listed as optional. Candid will use this data when attempting to bundle multiple
640
+ # Charge Captures into a single encounter.Request of type CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData, as a Hash
641
+ # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
642
+ # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
643
+ # * :external_claim_submission (Hash)
644
+ # * :claim_created_at (DateTime)
645
+ # * :patient_control_number (String)
646
+ # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
647
+ # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
648
+ # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
649
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNote>)
650
+ # * :benefits_assigned_to_provider (Boolean)
651
+ # * :prior_authorization_number (String)
652
+ # * :external_id (String)
653
+ # * :date_of_service (Date)
654
+ # * :tag_ids (Array<String>)
655
+ # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
656
+ # * :pay_to_address (Hash)
657
+ # * :zip_plus_four_code (String)
658
+ # * :address_1 (String)
659
+ # * :address_2 (String)
660
+ # * :city (String)
661
+ # * :state (CandidApiClient::Commons::Types::State)
662
+ # * :zip_code (String)
663
+ # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
664
+ # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
665
+ # * :provider_accepts_assignment (Boolean)
666
+ # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
667
+ # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
668
+ # * :appointment_type (String)
669
+ # * :end_date_of_service (Date)
670
+ # * :subscriber_primary (Hash)
671
+ # * :insurance_card (Hash)
672
+ # * :member_id (String)
673
+ # * :payer_name (String)
674
+ # * :payer_id (String)
675
+ # * :rx_bin (String)
676
+ # * :rx_pcn (String)
677
+ # * :image_url_front (String)
678
+ # * :image_url_back (String)
679
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
680
+ # * :group_number (String)
681
+ # * :plan_name (String)
682
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
683
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
684
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
685
+ # * :date_of_birth (Date)
686
+ # * :address (Hash)
687
+ # * :zip_plus_four_code (String)
688
+ # * :address_1 (String)
689
+ # * :address_2 (String)
690
+ # * :city (String)
691
+ # * :state (CandidApiClient::Commons::Types::State)
692
+ # * :zip_code (String)
693
+ # * :first_name (String)
694
+ # * :last_name (String)
695
+ # * :gender (CandidApiClient::Individual::Types::Gender)
696
+ # * :subscriber_secondary (Hash)
697
+ # * :insurance_card (Hash)
698
+ # * :member_id (String)
699
+ # * :payer_name (String)
700
+ # * :payer_id (String)
701
+ # * :rx_bin (String)
702
+ # * :rx_pcn (String)
703
+ # * :image_url_front (String)
704
+ # * :image_url_back (String)
705
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
706
+ # * :group_number (String)
707
+ # * :plan_name (String)
708
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
709
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
710
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
711
+ # * :date_of_birth (Date)
712
+ # * :address (Hash)
713
+ # * :zip_plus_four_code (String)
714
+ # * :address_1 (String)
715
+ # * :address_2 (String)
716
+ # * :city (String)
717
+ # * :state (CandidApiClient::Commons::Types::State)
718
+ # * :zip_code (String)
719
+ # * :first_name (String)
720
+ # * :last_name (String)
721
+ # * :gender (CandidApiClient::Individual::Types::Gender)
722
+ # * :additional_information (String)
723
+ # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
724
+ # * :admission_date (Date)
725
+ # * :discharge_date (Date)
726
+ # * :onset_of_current_illness_or_symptom_date (Date)
727
+ # * :last_menstrual_period_date (Date)
728
+ # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
729
+ # * :patient (Hash)
730
+ # * :first_name (String)
731
+ # * :last_name (String)
732
+ # * :gender (CandidApiClient::Individual::Types::Gender)
733
+ # * :external_id (String)
734
+ # * :date_of_birth (Date)
735
+ # * :address (Hash)
736
+ # * :zip_plus_four_code (String)
737
+ # * :address_1 (String)
738
+ # * :address_2 (String)
739
+ # * :city (String)
740
+ # * :state (CandidApiClient::Commons::Types::State)
741
+ # * :zip_code (String)
742
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
743
+ # * :phone_consent (Boolean)
744
+ # * :email (String)
745
+ # * :email_consent (Boolean)
746
+ # * :non_insurance_payers (Array<String>)
747
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
748
+ # * :patient_authorized_release (Boolean)
749
+ # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
750
+ # * :vitals (Hash)
751
+ # * :height_in (Integer)
752
+ # * :weight_lbs (Integer)
753
+ # * :blood_pressure_systolic_mmhg (Integer)
754
+ # * :blood_pressure_diastolic_mmhg (Integer)
755
+ # * :body_temperature_f (Float)
756
+ # * :hemoglobin_gdl (Float)
757
+ # * :hematocrit_pct (Float)
758
+ # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
759
+ # * :rendering_provider (Hash)
760
+ # * :npi (String)
761
+ # * :taxonomy_code (String)
762
+ # * :address (Hash)
763
+ # * :zip_plus_four_code (String)
764
+ # * :address_1 (String)
765
+ # * :address_2 (String)
766
+ # * :city (String)
767
+ # * :state (CandidApiClient::Commons::Types::State)
768
+ # * :zip_code (String)
769
+ # * :first_name (String)
770
+ # * :last_name (String)
771
+ # * :organization_name (String)
772
+ # * :service_facility (Hash)
773
+ # * :organization_name (String)
774
+ # * :npi (String)
775
+ # * :address (Hash)
776
+ # * :zip_plus_four_code (String)
777
+ # * :address_1 (String)
778
+ # * :address_2 (String)
779
+ # * :city (String)
780
+ # * :state (CandidApiClient::Commons::Types::State)
781
+ # * :zip_code (String)
782
+ # * :secondary_identification (String)
783
+ # * :guarantor (Hash)
784
+ # * :first_name (String)
785
+ # * :last_name (String)
786
+ # * :external_id (String)
787
+ # * :date_of_birth (Date)
788
+ # * :address (Hash)
789
+ # * :zip_plus_four_code (String)
790
+ # * :address_1 (String)
791
+ # * :address_2 (String)
792
+ # * :city (String)
793
+ # * :state (CandidApiClient::Commons::Types::State)
794
+ # * :zip_code (String)
795
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
796
+ # * :phone_consent (Boolean)
797
+ # * :email (String)
798
+ # * :email_consent (Boolean)
799
+ # * :billing_provider (Hash)
800
+ # * :address (Hash)
801
+ # * :zip_plus_four_code (String)
802
+ # * :address_1 (String)
803
+ # * :address_2 (String)
804
+ # * :city (String)
805
+ # * :state (CandidApiClient::Commons::Types::State)
806
+ # * :zip_code (String)
807
+ # * :tax_id (String)
808
+ # * :npi (String)
809
+ # * :taxonomy_code (String)
810
+ # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
811
+ # * :first_name (String)
812
+ # * :last_name (String)
813
+ # * :organization_name (String)
814
+ # * :supervising_provider (Hash)
815
+ # * :npi (String)
816
+ # * :taxonomy_code (String)
817
+ # * :address (Hash)
818
+ # * :zip_plus_four_code (String)
819
+ # * :address_1 (String)
820
+ # * :address_2 (String)
821
+ # * :city (String)
822
+ # * :state (CandidApiClient::Commons::Types::State)
823
+ # * :zip_code (String)
824
+ # * :first_name (String)
825
+ # * :last_name (String)
826
+ # * :organization_name (String)
827
+ # * :referring_provider (Hash)
828
+ # * :npi (String)
829
+ # * :taxonomy_code (String)
830
+ # * :address (Hash)
831
+ # * :zip_plus_four_code (String)
832
+ # * :address_1 (String)
833
+ # * :address_2 (String)
834
+ # * :city (String)
835
+ # * :state (CandidApiClient::Commons::Types::State)
836
+ # * :zip_code (String)
837
+ # * :first_name (String)
838
+ # * :last_name (String)
839
+ # * :organization_name (String)
840
+ # * :initial_referring_provider (Hash)
841
+ # * :npi (String)
842
+ # * :taxonomy_code (String)
843
+ # * :address (Hash)
844
+ # * :zip_plus_four_code (String)
845
+ # * :address_1 (String)
846
+ # * :address_2 (String)
847
+ # * :city (String)
848
+ # * :state (CandidApiClient::Commons::Types::State)
849
+ # * :zip_code (String)
850
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
851
+ # * :first_name (String)
852
+ # * :last_name (String)
853
+ # * :organization_name (String)
854
+ # * :referral_number (String)
855
+ # @param encounter_external_id [String] A client-specified unique ID to associate with this encounter; for example, your
856
+ # internal encounter ID or a Dr. Chrono encounter ID. This field should not
857
+ # contain PHI.
858
+ # @param ehr_source_url [String] External URL reference that links to Charge Capture details within the external
859
+ # system (e.g. the EHR visit page). Send full URL format for the external link
860
+ # (e.g. https://emr_charge_capture_url.com/123).
861
+ # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
862
+ # @param status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge capture
863
+ # @param request_options [CandidApiClient::RequestOptions]
864
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapture]
865
+ # @example
866
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
867
+ # api.charge_capture.v_1.create(
868
+ # data: { diagnoses: , interventions: , external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] }, service_lines: , patient_histories: , billing_notes: , benefits_assigned_to_provider: true, prior_authorization_number: "string", external_id: "string", date_of_service: DateTime.parse(2023-01-15), tag_ids: , clinical_notes: , pay_to_address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, billable_status: BILLABLE, responsible_party: INSURANCE_PAY, provider_accepts_assignment: true, synchronicity: SYNCHRONOUS, place_of_service_code: PHARMACY, appointment_type: "string", end_date_of_service: DateTime.parse(2023-01-15), subscriber_primary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string" }, patient_relationship_to_subscriber_code: SPOUSE, first_name: "string", last_name: "string", gender: MALE }, subscriber_secondary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string" }, patient_relationship_to_subscriber_code: SPOUSE, first_name: "string", last_name: "string", gender: MALE }, additional_information: "string", service_authorization_exception_code: C_1, admission_date: DateTime.parse(2023-01-15), discharge_date: DateTime.parse(2023-01-15), onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15), last_menstrual_period_date: DateTime.parse(2023-01-15), delay_reason_code: C_1, patient: { }, patient_authorized_release: true, schema_instances: , vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 }, existing_medications: , rendering_provider: { }, service_facility: { organization_name: "Test Organization", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } }, guarantor: { }, billing_provider: { }, supervising_provider: { }, referring_provider: { }, initial_referring_provider: { }, referral_number: "string" },
869
+ # encounter_external_id: "string",
870
+ # ehr_source_url: "string",
871
+ # patient_external_id: "string",
872
+ # status: PLANNED
873
+ # )
874
+ def create(data:, encounter_external_id:, patient_external_id:, status:, ehr_source_url: nil,
875
+ request_options: nil)
876
+ Async do
877
+ response = @request_client.conn.post do |req|
878
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
879
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
880
+ req.headers = {
881
+ **(req.headers || {}),
882
+ **@request_client.get_headers,
883
+ **(request_options&.additional_headers || {})
884
+ }.compact
885
+ req.body = {
886
+ **(request_options&.additional_body_parameters || {}),
887
+ data: data,
888
+ encounter_external_id: encounter_external_id,
889
+ ehr_source_url: ehr_source_url,
890
+ patient_external_id: patient_external_id,
891
+ status: status
892
+ }.compact
893
+ req.url "#{@request_client.get_url(environment: CandidApi,
894
+ request_options: request_options)}/api/charge_captures/v1"
895
+ end
896
+ CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: response.body)
897
+ end
898
+ end
899
+
900
+ # @param charge_capture_id [String]
901
+ # @param request_options [CandidApiClient::RequestOptions]
902
+ # @return [Void]
903
+ # @example
904
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
905
+ # api.charge_capture.v_1.delete(charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
906
+ def delete(charge_capture_id:, request_options: nil)
907
+ Async do
908
+ @request_client.conn.delete do |req|
909
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
910
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
911
+ req.headers = {
912
+ **(req.headers || {}),
913
+ **@request_client.get_headers,
914
+ **(request_options&.additional_headers || {})
915
+ }.compact
916
+ req.url "#{@request_client.get_url(environment: CandidApi,
917
+ request_options: request_options)}/api/charge_captures/v1/#{charge_capture_id}"
918
+ end
919
+ end
920
+ end
921
+
922
+ # @param charge_capture_id [String]
923
+ # @param data [Hash] Request of type CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData, as a Hash
924
+ # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
925
+ # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
926
+ # * :external_claim_submission (Hash)
927
+ # * :claim_created_at (DateTime)
928
+ # * :patient_control_number (String)
929
+ # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
930
+ # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
931
+ # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
932
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNote>)
933
+ # * :benefits_assigned_to_provider (Boolean)
934
+ # * :prior_authorization_number (String)
935
+ # * :external_id (String)
936
+ # * :date_of_service (Date)
937
+ # * :tag_ids (Array<String>)
938
+ # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
939
+ # * :pay_to_address (Hash)
940
+ # * :zip_plus_four_code (String)
941
+ # * :address_1 (String)
942
+ # * :address_2 (String)
943
+ # * :city (String)
944
+ # * :state (CandidApiClient::Commons::Types::State)
945
+ # * :zip_code (String)
946
+ # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
947
+ # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
948
+ # * :provider_accepts_assignment (Boolean)
949
+ # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
950
+ # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
951
+ # * :appointment_type (String)
952
+ # * :end_date_of_service (Date)
953
+ # * :subscriber_primary (Hash)
954
+ # * :insurance_card (Hash)
955
+ # * :member_id (String)
956
+ # * :payer_name (String)
957
+ # * :payer_id (String)
958
+ # * :rx_bin (String)
959
+ # * :rx_pcn (String)
960
+ # * :image_url_front (String)
961
+ # * :image_url_back (String)
962
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
963
+ # * :group_number (String)
964
+ # * :plan_name (String)
965
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
966
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
967
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
968
+ # * :date_of_birth (Date)
969
+ # * :address (Hash)
970
+ # * :zip_plus_four_code (String)
971
+ # * :address_1 (String)
972
+ # * :address_2 (String)
973
+ # * :city (String)
974
+ # * :state (CandidApiClient::Commons::Types::State)
975
+ # * :zip_code (String)
976
+ # * :first_name (String)
977
+ # * :last_name (String)
978
+ # * :gender (CandidApiClient::Individual::Types::Gender)
979
+ # * :subscriber_secondary (Hash)
980
+ # * :insurance_card (Hash)
981
+ # * :member_id (String)
982
+ # * :payer_name (String)
983
+ # * :payer_id (String)
984
+ # * :rx_bin (String)
985
+ # * :rx_pcn (String)
986
+ # * :image_url_front (String)
987
+ # * :image_url_back (String)
988
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
989
+ # * :group_number (String)
990
+ # * :plan_name (String)
991
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
992
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
993
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
994
+ # * :date_of_birth (Date)
995
+ # * :address (Hash)
996
+ # * :zip_plus_four_code (String)
997
+ # * :address_1 (String)
998
+ # * :address_2 (String)
999
+ # * :city (String)
1000
+ # * :state (CandidApiClient::Commons::Types::State)
1001
+ # * :zip_code (String)
1002
+ # * :first_name (String)
1003
+ # * :last_name (String)
1004
+ # * :gender (CandidApiClient::Individual::Types::Gender)
1005
+ # * :additional_information (String)
1006
+ # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
1007
+ # * :admission_date (Date)
1008
+ # * :discharge_date (Date)
1009
+ # * :onset_of_current_illness_or_symptom_date (Date)
1010
+ # * :last_menstrual_period_date (Date)
1011
+ # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
1012
+ # * :patient (Hash)
1013
+ # * :first_name (String)
1014
+ # * :last_name (String)
1015
+ # * :gender (CandidApiClient::Individual::Types::Gender)
1016
+ # * :external_id (String)
1017
+ # * :date_of_birth (Date)
1018
+ # * :address (Hash)
1019
+ # * :zip_plus_four_code (String)
1020
+ # * :address_1 (String)
1021
+ # * :address_2 (String)
1022
+ # * :city (String)
1023
+ # * :state (CandidApiClient::Commons::Types::State)
1024
+ # * :zip_code (String)
1025
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
1026
+ # * :phone_consent (Boolean)
1027
+ # * :email (String)
1028
+ # * :email_consent (Boolean)
1029
+ # * :non_insurance_payers (Array<String>)
1030
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
1031
+ # * :patient_authorized_release (Boolean)
1032
+ # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
1033
+ # * :vitals (Hash)
1034
+ # * :height_in (Integer)
1035
+ # * :weight_lbs (Integer)
1036
+ # * :blood_pressure_systolic_mmhg (Integer)
1037
+ # * :blood_pressure_diastolic_mmhg (Integer)
1038
+ # * :body_temperature_f (Float)
1039
+ # * :hemoglobin_gdl (Float)
1040
+ # * :hematocrit_pct (Float)
1041
+ # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
1042
+ # * :rendering_provider (Hash)
1043
+ # * :npi (String)
1044
+ # * :taxonomy_code (String)
1045
+ # * :address (Hash)
1046
+ # * :zip_plus_four_code (String)
1047
+ # * :address_1 (String)
1048
+ # * :address_2 (String)
1049
+ # * :city (String)
1050
+ # * :state (CandidApiClient::Commons::Types::State)
1051
+ # * :zip_code (String)
1052
+ # * :first_name (String)
1053
+ # * :last_name (String)
1054
+ # * :organization_name (String)
1055
+ # * :service_facility (Hash)
1056
+ # * :organization_name (String)
1057
+ # * :npi (String)
1058
+ # * :address (Hash)
1059
+ # * :zip_plus_four_code (String)
1060
+ # * :address_1 (String)
1061
+ # * :address_2 (String)
1062
+ # * :city (String)
1063
+ # * :state (CandidApiClient::Commons::Types::State)
1064
+ # * :zip_code (String)
1065
+ # * :secondary_identification (String)
1066
+ # * :guarantor (Hash)
1067
+ # * :first_name (String)
1068
+ # * :last_name (String)
1069
+ # * :external_id (String)
1070
+ # * :date_of_birth (Date)
1071
+ # * :address (Hash)
1072
+ # * :zip_plus_four_code (String)
1073
+ # * :address_1 (String)
1074
+ # * :address_2 (String)
1075
+ # * :city (String)
1076
+ # * :state (CandidApiClient::Commons::Types::State)
1077
+ # * :zip_code (String)
1078
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
1079
+ # * :phone_consent (Boolean)
1080
+ # * :email (String)
1081
+ # * :email_consent (Boolean)
1082
+ # * :billing_provider (Hash)
1083
+ # * :address (Hash)
1084
+ # * :zip_plus_four_code (String)
1085
+ # * :address_1 (String)
1086
+ # * :address_2 (String)
1087
+ # * :city (String)
1088
+ # * :state (CandidApiClient::Commons::Types::State)
1089
+ # * :zip_code (String)
1090
+ # * :tax_id (String)
1091
+ # * :npi (String)
1092
+ # * :taxonomy_code (String)
1093
+ # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
1094
+ # * :first_name (String)
1095
+ # * :last_name (String)
1096
+ # * :organization_name (String)
1097
+ # * :supervising_provider (Hash)
1098
+ # * :npi (String)
1099
+ # * :taxonomy_code (String)
1100
+ # * :address (Hash)
1101
+ # * :zip_plus_four_code (String)
1102
+ # * :address_1 (String)
1103
+ # * :address_2 (String)
1104
+ # * :city (String)
1105
+ # * :state (CandidApiClient::Commons::Types::State)
1106
+ # * :zip_code (String)
1107
+ # * :first_name (String)
1108
+ # * :last_name (String)
1109
+ # * :organization_name (String)
1110
+ # * :referring_provider (Hash)
1111
+ # * :npi (String)
1112
+ # * :taxonomy_code (String)
1113
+ # * :address (Hash)
1114
+ # * :zip_plus_four_code (String)
1115
+ # * :address_1 (String)
1116
+ # * :address_2 (String)
1117
+ # * :city (String)
1118
+ # * :state (CandidApiClient::Commons::Types::State)
1119
+ # * :zip_code (String)
1120
+ # * :first_name (String)
1121
+ # * :last_name (String)
1122
+ # * :organization_name (String)
1123
+ # * :initial_referring_provider (Hash)
1124
+ # * :npi (String)
1125
+ # * :taxonomy_code (String)
1126
+ # * :address (Hash)
1127
+ # * :zip_plus_four_code (String)
1128
+ # * :address_1 (String)
1129
+ # * :address_2 (String)
1130
+ # * :city (String)
1131
+ # * :state (CandidApiClient::Commons::Types::State)
1132
+ # * :zip_code (String)
1133
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
1134
+ # * :first_name (String)
1135
+ # * :last_name (String)
1136
+ # * :organization_name (String)
1137
+ # * :referral_number (String)
1138
+ # @param encounter_external_id [String] A client-specified unique ID to associate with this encounter;
1139
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
1140
+ # This field should not contain PHI.
1141
+ # @param ehr_source_url [String] External URL reference that links to Charge Capture details within the external
1142
+ # system (e.g. the EHR visit page).
1143
+ # Send full URL format for the external link (e.g.
1144
+ # https://emr_charge_capture_url.com/123).
1145
+ # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
1146
+ # @param status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge capture
1147
+ # @param request_options [CandidApiClient::RequestOptions]
1148
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapture]
1149
+ # @example
1150
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1151
+ # api.charge_capture.v_1.update(
1152
+ # charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
1153
+ # data: { diagnoses: , interventions: , external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] }, service_lines: , patient_histories: , billing_notes: , benefits_assigned_to_provider: true, prior_authorization_number: "string", external_id: "string", date_of_service: DateTime.parse(2023-01-15), tag_ids: , clinical_notes: , pay_to_address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, billable_status: BILLABLE, responsible_party: INSURANCE_PAY, provider_accepts_assignment: true, synchronicity: SYNCHRONOUS, place_of_service_code: PHARMACY, appointment_type: "string", end_date_of_service: DateTime.parse(2023-01-15), subscriber_primary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string" }, patient_relationship_to_subscriber_code: SPOUSE, first_name: "string", last_name: "string", gender: MALE }, subscriber_secondary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string" }, patient_relationship_to_subscriber_code: SPOUSE, first_name: "string", last_name: "string", gender: MALE }, additional_information: "string", service_authorization_exception_code: C_1, admission_date: DateTime.parse(2023-01-15), discharge_date: DateTime.parse(2023-01-15), onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15), last_menstrual_period_date: DateTime.parse(2023-01-15), delay_reason_code: C_1, patient: { }, patient_authorized_release: true, schema_instances: , vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 }, existing_medications: , rendering_provider: { }, service_facility: { organization_name: "Test Organization", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } }, guarantor: { }, billing_provider: { }, supervising_provider: { }, referring_provider: { }, initial_referring_provider: { }, referral_number: "string" },
1154
+ # encounter_external_id: "string",
1155
+ # ehr_source_url: "string",
1156
+ # patient_external_id: "string",
1157
+ # status: PLANNED
1158
+ # )
1159
+ def update(charge_capture_id:, data: nil, encounter_external_id: nil, ehr_source_url: nil,
1160
+ patient_external_id: nil, status: nil, request_options: nil)
1161
+ Async do
1162
+ response = @request_client.conn.patch do |req|
1163
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1164
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1165
+ req.headers = {
1166
+ **(req.headers || {}),
1167
+ **@request_client.get_headers,
1168
+ **(request_options&.additional_headers || {})
1169
+ }.compact
1170
+ req.body = {
1171
+ **(request_options&.additional_body_parameters || {}),
1172
+ data: data,
1173
+ encounter_external_id: encounter_external_id,
1174
+ ehr_source_url: ehr_source_url,
1175
+ patient_external_id: patient_external_id,
1176
+ status: status
1177
+ }.compact
1178
+ req.url "#{@request_client.get_url(environment: CandidApi,
1179
+ request_options: request_options)}/api/charge_captures/v1/#{charge_capture_id}"
1180
+ end
1181
+ CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: response.body)
1182
+ end
1183
+ end
1184
+
1185
+ # @param charge_capture_id [String]
1186
+ # @param request_options [CandidApiClient::RequestOptions]
1187
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapture]
1188
+ # @example
1189
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1190
+ # api.charge_capture.v_1.get(charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
1191
+ def get(charge_capture_id:, request_options: nil)
1192
+ Async do
1193
+ response = @request_client.conn.get do |req|
1194
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1195
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1196
+ req.headers = {
1197
+ **(req.headers || {}),
1198
+ **@request_client.get_headers,
1199
+ **(request_options&.additional_headers || {})
1200
+ }.compact
1201
+ req.url "#{@request_client.get_url(environment: CandidApi,
1202
+ request_options: request_options)}/api/charge_captures/v1/#{charge_capture_id}"
1203
+ end
1204
+ CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: response.body)
1205
+ end
1206
+ end
1207
+
1208
+ # @param limit [Integer] Maximum number of entities per page, defaults to 100.
1209
+ # @param page_token [String]
1210
+ # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
1211
+ # @param status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge captures
1212
+ # @param external_id [String] A client-specified unique ID to associate with this encounter;
1213
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
1214
+ # This field should not contain PHI.
1215
+ # @param request_options [CandidApiClient::RequestOptions]
1216
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePage]
1217
+ # @example
1218
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1219
+ # api.charge_capture.v_1.get_all(
1220
+ # limit: 1,
1221
+ # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
1222
+ # patient_external_id: "string",
1223
+ # status: PLANNED,
1224
+ # external_id: "string"
1225
+ # )
1226
+ def get_all(limit: nil, page_token: nil, patient_external_id: nil, status: nil, external_id: nil,
1227
+ request_options: nil)
1228
+ Async do
1229
+ response = @request_client.conn.get do |req|
1230
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1231
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1232
+ req.headers = {
1233
+ **(req.headers || {}),
1234
+ **@request_client.get_headers,
1235
+ **(request_options&.additional_headers || {})
1236
+ }.compact
1237
+ req.params = {
1238
+ **(request_options&.additional_query_parameters || {}),
1239
+ "limit": limit,
1240
+ "page_token": page_token,
1241
+ "patient_external_id": patient_external_id,
1242
+ "status": status,
1243
+ "external_id": external_id
1244
+ }.compact
1245
+ req.url "#{@request_client.get_url(environment: CandidApi,
1246
+ request_options: request_options)}/api/charge_captures/v1"
1247
+ end
1248
+ CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePage.from_json(json_object: response.body)
1249
+ end
1250
+ end
1251
+ end
1252
+ end
1253
+ end
1254
+ end