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