candidhealth 0.33.0 → 0.33.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +32 -270
  3. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +87 -75
  4. data/lib/candidhealth/pre_encounter/appointments/v_1/types/{appointment_sort_field.rb → appointment_status.rb} +5 -3
  5. data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +87 -75
  6. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
  7. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_date.rb +87 -0
  8. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_metadata.rb +13 -10
  9. data/lib/candidhealth/pre_encounter/lists/client.rb +32 -0
  10. data/lib/candidhealth/pre_encounter/lists/v_1/client.rb +213 -0
  11. data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb +104 -0
  12. data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_page.rb +90 -0
  13. data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_item.rb +104 -0
  14. data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_page.rb +90 -0
  15. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +126 -150
  16. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +121 -0
  17. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +32 -2
  18. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +32 -2
  19. data/lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient.rb +72 -0
  20. data/lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body.rb +84 -0
  21. data/lib/requests.rb +2 -2
  22. data/lib/types_export.rb +9 -3
  23. metadata +13 -5
  24. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_reason.rb +0 -19
  25. 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: 68c7bf385ff7ec192487a4f558a9582eef10af3fd08559c228bec0d819c309c7
4
- data.tar.gz: f39a7056a9da93d424151574ba44de7c121c41643ec6d77fbdf430e822258e38
3
+ metadata.gz: a98c5fdacd8e8244244950864e9684ef91cbce3e350c8e8955d3c7ffc483dd5d
4
+ data.tar.gz: da0ee8fb3edee16a367063822e750627a890bd4df177e515647da2a06ed7a4b2
5
5
  SHA512:
6
- metadata.gz: da757aa4d51e868da4a3d72fb7f303a635a2732a84605c09528690dd7be99bb9090fc34b72dc3e6b61a23b01cb42d906a601b20a82cddd63be9bb316c17e2585
7
- data.tar.gz: 17ada35575540aa27bfa4a3d837608db08446a9d43f5a88de284bee32e1a5c48e90c59b5371b37b4a7b440477d47bc9b9b8126f429aa8ca36871c8dcba5b54b2
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
- # * :appointment_reason (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentReason)
71
- # * :appointment_type (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentType)
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", checked_in: true, assigned_patient_location: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referring_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", appointment_reason: CHECKUP, appointment_type: COMPLETE, location_resource_id: "string", work_queue: EMERGENT_ISSUE })
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
- # * :appointment_reason (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentReason)
192
- # * :appointment_type (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentType)
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", checked_in: true, assigned_patient_location: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referring_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", appointment_reason: CHECKUP, appointment_type: COMPLETE, location_resource_id: "string", work_queue: EMERGENT_ISSUE }
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
- # * :appointment_reason (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentReason)
359
- # * :appointment_type (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentType)
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", checked_in: true, assigned_patient_location: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referring_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", appointment_reason: CHECKUP, appointment_type: COMPLETE, location_resource_id: "string", work_queue: EMERGENT_ISSUE })
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
- # * :appointment_reason (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentReason)
486
- # * :appointment_type (CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentType)
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", checked_in: true, assigned_patient_location: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referring_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", appointment_reason: CHECKUP, appointment_type: COMPLETE, location_resource_id: "string", work_queue: EMERGENT_ISSUE }
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