candidhealth 0.33.0 → 0.33.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +32 -270
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +87 -75
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/{appointment_sort_field.rb → appointment_status.rb} +5 -3
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +87 -75
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_date.rb +87 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_metadata.rb +13 -10
- data/lib/candidhealth/pre_encounter/lists/client.rb +32 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/client.rb +213 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb +104 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_page.rb +90 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_item.rb +104 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_page.rb +90 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +126 -150
- data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +121 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +32 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +32 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient.rb +72 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body.rb +84 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +9 -3
- metadata +13 -5
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_reason.rb +0 -19
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_type.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a98c5fdacd8e8244244950864e9684ef91cbce3e350c8e8955d3c7ffc483dd5d
|
4
|
+
data.tar.gz: da0ee8fb3edee16a367063822e750627a890bd4df177e515647da2a06ed7a4b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e63f16b283eefd53dcb0271efcf74cd51525ab20f69e71400403d79f5dc73aab46d3caa89d919035ae8d340554731abe223be86c4df327c3d892d25c29de150
|
7
|
+
data.tar.gz: 8b804b338b05858fa779ff969f935618fd491e669c0b759c87589933cf42c39d510600fdf9f1322f731ae118ca8f69335c5a046ae3f54fbfa358ee34fd72c5e5
|
@@ -4,10 +4,6 @@ require_relative "../../../../requests"
|
|
4
4
|
require_relative "types/mutable_appointment"
|
5
5
|
require_relative "types/appointment"
|
6
6
|
require "json"
|
7
|
-
require "date"
|
8
|
-
require_relative "types/appointment_work_queue"
|
9
|
-
require_relative "types/appointment_sort_field"
|
10
|
-
require_relative "../../common/types/sort_direction"
|
11
7
|
require "async"
|
12
8
|
|
13
9
|
module CandidApiClient
|
@@ -29,53 +25,24 @@ module CandidApiClient
|
|
29
25
|
#
|
30
26
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment, as a Hash
|
31
27
|
# * :patient_id (String)
|
32
|
-
# * :checked_in (Boolean)
|
33
|
-
# * :assigned_patient_location (String)
|
34
|
-
# * :attending_doctor (Hash)
|
35
|
-
# * :name (Hash)
|
36
|
-
# * :family (String)
|
37
|
-
# * :given (Array<String>)
|
38
|
-
# * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
|
39
|
-
# * :period (Hash)
|
40
|
-
# * :start (Date)
|
41
|
-
# * :end_ (Date)
|
42
|
-
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
43
|
-
# * :npi (String)
|
44
|
-
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
45
|
-
# * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
|
46
|
-
# * :period (Hash)
|
47
|
-
# * :start (Date)
|
48
|
-
# * :end_ (Date)
|
49
|
-
# * :canonical_id (String)
|
50
|
-
# * :referring_doctor (Hash)
|
51
|
-
# * :name (Hash)
|
52
|
-
# * :family (String)
|
53
|
-
# * :given (Array<String>)
|
54
|
-
# * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
|
55
|
-
# * :period (Hash)
|
56
|
-
# * :start (Date)
|
57
|
-
# * :end_ (Date)
|
58
|
-
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
59
|
-
# * :npi (String)
|
60
|
-
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
61
|
-
# * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
|
62
|
-
# * :period (Hash)
|
63
|
-
# * :start (Date)
|
64
|
-
# * :end_ (Date)
|
65
|
-
# * :canonical_id (String)
|
66
28
|
# * :start_timestamp (DateTime)
|
29
|
+
# * :status (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus)
|
67
30
|
# * :service_duration (Integer)
|
68
31
|
# * :services (Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Service>)
|
69
32
|
# * :placer_appointment_id (String)
|
70
|
-
# * :
|
71
|
-
# * :
|
33
|
+
# * :estimated_copay_cents (Integer)
|
34
|
+
# * :estimated_patient_responsibility_cents (Integer)
|
35
|
+
# * :patient_deposit_cents (Integer)
|
36
|
+
# * :checked_in_timestamp (DateTime)
|
37
|
+
# * :notes (String)
|
72
38
|
# * :location_resource_id (String)
|
39
|
+
# * :automated_eligibility_check_complete (Boolean)
|
73
40
|
# * :work_queue (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue)
|
74
41
|
# @param request_options [CandidApiClient::RequestOptions]
|
75
42
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
76
43
|
# @example
|
77
44
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
78
|
-
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string",
|
45
|
+
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE })
|
79
46
|
def create(request:, request_options: nil)
|
80
47
|
response = @request_client.conn.post do |req|
|
81
48
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -150,47 +117,18 @@ module CandidApiClient
|
|
150
117
|
# @param version [String]
|
151
118
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment, as a Hash
|
152
119
|
# * :patient_id (String)
|
153
|
-
# * :checked_in (Boolean)
|
154
|
-
# * :assigned_patient_location (String)
|
155
|
-
# * :attending_doctor (Hash)
|
156
|
-
# * :name (Hash)
|
157
|
-
# * :family (String)
|
158
|
-
# * :given (Array<String>)
|
159
|
-
# * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
|
160
|
-
# * :period (Hash)
|
161
|
-
# * :start (Date)
|
162
|
-
# * :end_ (Date)
|
163
|
-
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
164
|
-
# * :npi (String)
|
165
|
-
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
166
|
-
# * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
|
167
|
-
# * :period (Hash)
|
168
|
-
# * :start (Date)
|
169
|
-
# * :end_ (Date)
|
170
|
-
# * :canonical_id (String)
|
171
|
-
# * :referring_doctor (Hash)
|
172
|
-
# * :name (Hash)
|
173
|
-
# * :family (String)
|
174
|
-
# * :given (Array<String>)
|
175
|
-
# * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
|
176
|
-
# * :period (Hash)
|
177
|
-
# * :start (Date)
|
178
|
-
# * :end_ (Date)
|
179
|
-
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
180
|
-
# * :npi (String)
|
181
|
-
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
182
|
-
# * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
|
183
|
-
# * :period (Hash)
|
184
|
-
# * :start (Date)
|
185
|
-
# * :end_ (Date)
|
186
|
-
# * :canonical_id (String)
|
187
120
|
# * :start_timestamp (DateTime)
|
121
|
+
# * :status (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus)
|
188
122
|
# * :service_duration (Integer)
|
189
123
|
# * :services (Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Service>)
|
190
124
|
# * :placer_appointment_id (String)
|
191
|
-
# * :
|
192
|
-
# * :
|
125
|
+
# * :estimated_copay_cents (Integer)
|
126
|
+
# * :estimated_patient_responsibility_cents (Integer)
|
127
|
+
# * :patient_deposit_cents (Integer)
|
128
|
+
# * :checked_in_timestamp (DateTime)
|
129
|
+
# * :notes (String)
|
193
130
|
# * :location_resource_id (String)
|
131
|
+
# * :automated_eligibility_check_complete (Boolean)
|
194
132
|
# * :work_queue (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue)
|
195
133
|
# @param request_options [CandidApiClient::RequestOptions]
|
196
134
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
@@ -199,7 +137,7 @@ module CandidApiClient
|
|
199
137
|
# api.pre_encounter.appointments.v_1.update(
|
200
138
|
# id: "string",
|
201
139
|
# version: "string",
|
202
|
-
# request: { patient_id: "string",
|
140
|
+
# request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE }
|
203
141
|
# )
|
204
142
|
def update(id:, version:, request:, request_options: nil)
|
205
143
|
response = @request_client.conn.put do |req|
|
@@ -242,64 +180,6 @@ module CandidApiClient
|
|
242
180
|
request_options: request_options)}/appointments/v1/#{id}/#{version}"
|
243
181
|
end
|
244
182
|
end
|
245
|
-
|
246
|
-
# Searches for appointments that match the query parameters.
|
247
|
-
#
|
248
|
-
# @param checked_in [Boolean]
|
249
|
-
# @param patient_id [String]
|
250
|
-
# @param min_start_timestamp [DateTime]
|
251
|
-
# @param max_start_timestamp [DateTime]
|
252
|
-
# @param placer_appointment_id [String]
|
253
|
-
# @param work_queue [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue]
|
254
|
-
# @param sort_field [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentSortField] Defaults to start_timestamp.
|
255
|
-
# @param sort_direction [CandidApiClient::PreEncounter::Common::Types::SortDirection] Defaults to asc.
|
256
|
-
# @param limit [Integer] Defaults to 1000.
|
257
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
258
|
-
# @return [Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment>]
|
259
|
-
# @example
|
260
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
261
|
-
# api.pre_encounter.appointments.v_1.get_multi(
|
262
|
-
# checked_in: true,
|
263
|
-
# patient_id: "string",
|
264
|
-
# min_start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z),
|
265
|
-
# max_start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z),
|
266
|
-
# placer_appointment_id: "string",
|
267
|
-
# work_queue: EMERGENT_ISSUE,
|
268
|
-
# sort_field: START_TIMESTAMP,
|
269
|
-
# sort_direction: ASC,
|
270
|
-
# limit: 1
|
271
|
-
# )
|
272
|
-
def get_multi(checked_in: nil, patient_id: nil, min_start_timestamp: nil, max_start_timestamp: nil,
|
273
|
-
placer_appointment_id: nil, work_queue: nil, sort_field: nil, sort_direction: nil, limit: nil, request_options: nil)
|
274
|
-
response = @request_client.conn.get do |req|
|
275
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
276
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
277
|
-
req.headers = {
|
278
|
-
**(req.headers || {}),
|
279
|
-
**@request_client.get_headers,
|
280
|
-
**(request_options&.additional_headers || {})
|
281
|
-
}.compact
|
282
|
-
req.params = {
|
283
|
-
**(request_options&.additional_query_parameters || {}),
|
284
|
-
"checked_in": checked_in,
|
285
|
-
"patient_id": patient_id,
|
286
|
-
"min_start_timestamp": min_start_timestamp,
|
287
|
-
"max_start_timestamp": max_start_timestamp,
|
288
|
-
"placer_appointment_id": placer_appointment_id,
|
289
|
-
"work_queue": work_queue,
|
290
|
-
"sort_field": sort_field,
|
291
|
-
"sort_direction": sort_direction,
|
292
|
-
"limit": limit
|
293
|
-
}.compact
|
294
|
-
req.url "#{@request_client.get_url(environment: PreEncounter,
|
295
|
-
request_options: request_options)}/appointments/v1"
|
296
|
-
end
|
297
|
-
parsed_json = JSON.parse(response.body)
|
298
|
-
parsed_json&.map do |item|
|
299
|
-
item = item.to_json
|
300
|
-
CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment.from_json(json_object: item)
|
301
|
-
end
|
302
|
-
end
|
303
183
|
end
|
304
184
|
|
305
185
|
class AsyncV1Client
|
@@ -317,53 +197,24 @@ module CandidApiClient
|
|
317
197
|
#
|
318
198
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment, as a Hash
|
319
199
|
# * :patient_id (String)
|
320
|
-
# * :checked_in (Boolean)
|
321
|
-
# * :assigned_patient_location (String)
|
322
|
-
# * :attending_doctor (Hash)
|
323
|
-
# * :name (Hash)
|
324
|
-
# * :family (String)
|
325
|
-
# * :given (Array<String>)
|
326
|
-
# * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
|
327
|
-
# * :period (Hash)
|
328
|
-
# * :start (Date)
|
329
|
-
# * :end_ (Date)
|
330
|
-
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
331
|
-
# * :npi (String)
|
332
|
-
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
333
|
-
# * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
|
334
|
-
# * :period (Hash)
|
335
|
-
# * :start (Date)
|
336
|
-
# * :end_ (Date)
|
337
|
-
# * :canonical_id (String)
|
338
|
-
# * :referring_doctor (Hash)
|
339
|
-
# * :name (Hash)
|
340
|
-
# * :family (String)
|
341
|
-
# * :given (Array<String>)
|
342
|
-
# * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
|
343
|
-
# * :period (Hash)
|
344
|
-
# * :start (Date)
|
345
|
-
# * :end_ (Date)
|
346
|
-
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
347
|
-
# * :npi (String)
|
348
|
-
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
349
|
-
# * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
|
350
|
-
# * :period (Hash)
|
351
|
-
# * :start (Date)
|
352
|
-
# * :end_ (Date)
|
353
|
-
# * :canonical_id (String)
|
354
200
|
# * :start_timestamp (DateTime)
|
201
|
+
# * :status (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus)
|
355
202
|
# * :service_duration (Integer)
|
356
203
|
# * :services (Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Service>)
|
357
204
|
# * :placer_appointment_id (String)
|
358
|
-
# * :
|
359
|
-
# * :
|
205
|
+
# * :estimated_copay_cents (Integer)
|
206
|
+
# * :estimated_patient_responsibility_cents (Integer)
|
207
|
+
# * :patient_deposit_cents (Integer)
|
208
|
+
# * :checked_in_timestamp (DateTime)
|
209
|
+
# * :notes (String)
|
360
210
|
# * :location_resource_id (String)
|
211
|
+
# * :automated_eligibility_check_complete (Boolean)
|
361
212
|
# * :work_queue (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue)
|
362
213
|
# @param request_options [CandidApiClient::RequestOptions]
|
363
214
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
364
215
|
# @example
|
365
216
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
366
|
-
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string",
|
217
|
+
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE })
|
367
218
|
def create(request:, request_options: nil)
|
368
219
|
Async do
|
369
220
|
response = @request_client.conn.post do |req|
|
@@ -444,47 +295,18 @@ module CandidApiClient
|
|
444
295
|
# @param version [String]
|
445
296
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment, as a Hash
|
446
297
|
# * :patient_id (String)
|
447
|
-
# * :checked_in (Boolean)
|
448
|
-
# * :assigned_patient_location (String)
|
449
|
-
# * :attending_doctor (Hash)
|
450
|
-
# * :name (Hash)
|
451
|
-
# * :family (String)
|
452
|
-
# * :given (Array<String>)
|
453
|
-
# * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
|
454
|
-
# * :period (Hash)
|
455
|
-
# * :start (Date)
|
456
|
-
# * :end_ (Date)
|
457
|
-
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
458
|
-
# * :npi (String)
|
459
|
-
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
460
|
-
# * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
|
461
|
-
# * :period (Hash)
|
462
|
-
# * :start (Date)
|
463
|
-
# * :end_ (Date)
|
464
|
-
# * :canonical_id (String)
|
465
|
-
# * :referring_doctor (Hash)
|
466
|
-
# * :name (Hash)
|
467
|
-
# * :family (String)
|
468
|
-
# * :given (Array<String>)
|
469
|
-
# * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
|
470
|
-
# * :period (Hash)
|
471
|
-
# * :start (Date)
|
472
|
-
# * :end_ (Date)
|
473
|
-
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
474
|
-
# * :npi (String)
|
475
|
-
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
476
|
-
# * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
|
477
|
-
# * :period (Hash)
|
478
|
-
# * :start (Date)
|
479
|
-
# * :end_ (Date)
|
480
|
-
# * :canonical_id (String)
|
481
298
|
# * :start_timestamp (DateTime)
|
299
|
+
# * :status (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus)
|
482
300
|
# * :service_duration (Integer)
|
483
301
|
# * :services (Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Service>)
|
484
302
|
# * :placer_appointment_id (String)
|
485
|
-
# * :
|
486
|
-
# * :
|
303
|
+
# * :estimated_copay_cents (Integer)
|
304
|
+
# * :estimated_patient_responsibility_cents (Integer)
|
305
|
+
# * :patient_deposit_cents (Integer)
|
306
|
+
# * :checked_in_timestamp (DateTime)
|
307
|
+
# * :notes (String)
|
487
308
|
# * :location_resource_id (String)
|
309
|
+
# * :automated_eligibility_check_complete (Boolean)
|
488
310
|
# * :work_queue (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue)
|
489
311
|
# @param request_options [CandidApiClient::RequestOptions]
|
490
312
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
@@ -493,7 +315,7 @@ module CandidApiClient
|
|
493
315
|
# api.pre_encounter.appointments.v_1.update(
|
494
316
|
# id: "string",
|
495
317
|
# version: "string",
|
496
|
-
# request: { patient_id: "string",
|
318
|
+
# request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE }
|
497
319
|
# )
|
498
320
|
def update(id:, version:, request:, request_options: nil)
|
499
321
|
Async do
|
@@ -540,66 +362,6 @@ module CandidApiClient
|
|
540
362
|
end
|
541
363
|
end
|
542
364
|
end
|
543
|
-
|
544
|
-
# Searches for appointments that match the query parameters.
|
545
|
-
#
|
546
|
-
# @param checked_in [Boolean]
|
547
|
-
# @param patient_id [String]
|
548
|
-
# @param min_start_timestamp [DateTime]
|
549
|
-
# @param max_start_timestamp [DateTime]
|
550
|
-
# @param placer_appointment_id [String]
|
551
|
-
# @param work_queue [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue]
|
552
|
-
# @param sort_field [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentSortField] Defaults to start_timestamp.
|
553
|
-
# @param sort_direction [CandidApiClient::PreEncounter::Common::Types::SortDirection] Defaults to asc.
|
554
|
-
# @param limit [Integer] Defaults to 1000.
|
555
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
556
|
-
# @return [Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment>]
|
557
|
-
# @example
|
558
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
559
|
-
# api.pre_encounter.appointments.v_1.get_multi(
|
560
|
-
# checked_in: true,
|
561
|
-
# patient_id: "string",
|
562
|
-
# min_start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z),
|
563
|
-
# max_start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z),
|
564
|
-
# placer_appointment_id: "string",
|
565
|
-
# work_queue: EMERGENT_ISSUE,
|
566
|
-
# sort_field: START_TIMESTAMP,
|
567
|
-
# sort_direction: ASC,
|
568
|
-
# limit: 1
|
569
|
-
# )
|
570
|
-
def get_multi(checked_in: nil, patient_id: nil, min_start_timestamp: nil, max_start_timestamp: nil,
|
571
|
-
placer_appointment_id: nil, work_queue: nil, sort_field: nil, sort_direction: nil, limit: nil, request_options: nil)
|
572
|
-
Async do
|
573
|
-
response = @request_client.conn.get do |req|
|
574
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
575
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
576
|
-
req.headers = {
|
577
|
-
**(req.headers || {}),
|
578
|
-
**@request_client.get_headers,
|
579
|
-
**(request_options&.additional_headers || {})
|
580
|
-
}.compact
|
581
|
-
req.params = {
|
582
|
-
**(request_options&.additional_query_parameters || {}),
|
583
|
-
"checked_in": checked_in,
|
584
|
-
"patient_id": patient_id,
|
585
|
-
"min_start_timestamp": min_start_timestamp,
|
586
|
-
"max_start_timestamp": max_start_timestamp,
|
587
|
-
"placer_appointment_id": placer_appointment_id,
|
588
|
-
"work_queue": work_queue,
|
589
|
-
"sort_field": sort_field,
|
590
|
-
"sort_direction": sort_direction,
|
591
|
-
"limit": limit
|
592
|
-
}.compact
|
593
|
-
req.url "#{@request_client.get_url(environment: PreEncounter,
|
594
|
-
request_options: request_options)}/appointments/v1"
|
595
|
-
end
|
596
|
-
parsed_json = JSON.parse(response.body)
|
597
|
-
parsed_json&.map do |item|
|
598
|
-
item = item.to_json
|
599
|
-
CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment.from_json(json_object: item)
|
600
|
-
end
|
601
|
-
end
|
602
|
-
end
|
603
365
|
end
|
604
366
|
end
|
605
367
|
end
|