candidhealth 0.34.1 → 0.34.2

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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider.rb +10 -10
  3. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update.rb +123 -0
  4. data/lib/candidhealth/encounters/v_4/client.rb +282 -32
  5. data/lib/candidhealth/encounters/v_4/types/encounter.rb +11 -11
  6. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +11 -1
  7. data/lib/candidhealth/{third_party_payers/v_1/types/toggle_third_party_payer_enablement_request.rb → encounters/v_4/types/insurance_pay_missing_primary_coverage_error_type.rb} +17 -16
  8. data/lib/candidhealth/guarantor/v_1/client.rb +39 -89
  9. data/lib/candidhealth/guarantor/v_1/types/guarantor_update.rb +144 -0
  10. data/lib/candidhealth/payers/v_3/types/payer.rb +41 -2
  11. data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +68 -4
  12. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +17 -1
  13. data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +17 -1
  14. data/lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb +92 -0
  15. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +48 -4
  16. data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefit_type.rb +20 -0
  17. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +15 -1
  18. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_details.rb +104 -0
  19. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_level.rb +17 -0
  20. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit.rb +17 -0
  21. data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +16 -2
  22. data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +83 -0
  23. data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +15 -1
  24. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb +29 -2
  25. data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb +26 -2
  26. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +12 -4
  27. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +148 -0
  28. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization_unit.rb +15 -0
  29. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +26 -2
  30. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +26 -2
  31. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral.rb +106 -0
  32. data/lib/candidhealth/service_facility/client.rb +27 -51
  33. data/lib/candidhealth/service_facility/types/encounter_service_facility_update.rb +90 -0
  34. data/lib/candidhealth.rb +0 -21
  35. data/lib/requests.rb +2 -2
  36. data/lib/types_export.rb +13 -16
  37. metadata +15 -24
  38. data/lib/candidhealth/third_party_payer_payments/client.rb +0 -30
  39. data/lib/candidhealth/third_party_payer_payments/v_1/client.rb +0 -360
  40. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment.rb +0 -138
  41. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_create.rb +0 -124
  42. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_sort_field.rb +0 -14
  43. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payments_page.rb +0 -88
  44. data/lib/candidhealth/third_party_payer_refunds/client.rb +0 -30
  45. data/lib/candidhealth/third_party_payer_refunds/v_1/client.rb +0 -385
  46. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund.rb +0 -139
  47. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_create.rb +0 -125
  48. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_sort_field.rb +0 -14
  49. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refunds_page.rb +0 -88
  50. data/lib/candidhealth/third_party_payers/client.rb +0 -30
  51. data/lib/candidhealth/third_party_payers/v_1/client.rb +0 -375
  52. data/lib/candidhealth/third_party_payers/v_1/types/create_third_party_payer_request.rb +0 -79
  53. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer.rb +0 -100
  54. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_category_update.rb +0 -97
  55. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_description_update.rb +0 -97
  56. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_page.rb +0 -88
  57. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_sort_field.rb +0 -16
  58. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_update_request.rb +0 -92
@@ -14,6 +14,14 @@ module CandidApiClient
14
14
  attr_reader :payer_id
15
15
  # @return [String] The primary display name of the payer.
16
16
  attr_reader :payer_name
17
+ # @return [String] The name of the payer as it appears in Availity.
18
+ attr_reader :availity_payer_name
19
+ # @return [String] The ID of the payer as it appears in Availity.
20
+ attr_reader :availity_claims_payer_id
21
+ # @return [String] The eligibility ID of the payer as it appears in Availity.
22
+ attr_reader :availity_eligibility_id
23
+ # @return [String] The remittance ID of the payer as it appears in Availity.
24
+ attr_reader :availity_remittance_payer_id
17
25
  # @return [OpenStruct] Additional properties unmapped to the current class definition
18
26
  attr_reader :additional_properties
19
27
  # @return [Object]
@@ -25,14 +33,33 @@ module CandidApiClient
25
33
  # @param payer_uuid [String] Auto-generated ID set on creation.
26
34
  # @param payer_id [String] The primary national payer ID of the payer.
27
35
  # @param payer_name [String] The primary display name of the payer.
36
+ # @param availity_payer_name [String] The name of the payer as it appears in Availity.
37
+ # @param availity_claims_payer_id [String] The ID of the payer as it appears in Availity.
38
+ # @param availity_eligibility_id [String] The eligibility ID of the payer as it appears in Availity.
39
+ # @param availity_remittance_payer_id [String] The remittance ID of the payer as it appears in Availity.
28
40
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
29
41
  # @return [CandidApiClient::Payers::V3::Types::Payer]
30
- def initialize(payer_uuid:, payer_id:, payer_name:, additional_properties: nil)
42
+ def initialize(payer_uuid:, payer_id:, payer_name:, availity_payer_name: OMIT,
43
+ availity_claims_payer_id: OMIT, availity_eligibility_id: OMIT, availity_remittance_payer_id: OMIT, additional_properties: nil)
31
44
  @payer_uuid = payer_uuid
32
45
  @payer_id = payer_id
33
46
  @payer_name = payer_name
47
+ @availity_payer_name = availity_payer_name if availity_payer_name != OMIT
48
+ @availity_claims_payer_id = availity_claims_payer_id if availity_claims_payer_id != OMIT
49
+ @availity_eligibility_id = availity_eligibility_id if availity_eligibility_id != OMIT
50
+ @availity_remittance_payer_id = availity_remittance_payer_id if availity_remittance_payer_id != OMIT
34
51
  @additional_properties = additional_properties
35
- @_field_set = { "payer_uuid": payer_uuid, "payer_id": payer_id, "payer_name": payer_name }
52
+ @_field_set = {
53
+ "payer_uuid": payer_uuid,
54
+ "payer_id": payer_id,
55
+ "payer_name": payer_name,
56
+ "availity_payer_name": availity_payer_name,
57
+ "availity_claims_payer_id": availity_claims_payer_id,
58
+ "availity_eligibility_id": availity_eligibility_id,
59
+ "availity_remittance_payer_id": availity_remittance_payer_id
60
+ }.reject do |_k, v|
61
+ v == OMIT
62
+ end
36
63
  end
37
64
 
38
65
  # Deserialize a JSON object to an instance of Payer
@@ -44,10 +71,18 @@ module CandidApiClient
44
71
  payer_uuid = struct["payer_uuid"]
45
72
  payer_id = struct["payer_id"]
46
73
  payer_name = struct["payer_name"]
74
+ availity_payer_name = struct["availity_payer_name"]
75
+ availity_claims_payer_id = struct["availity_claims_payer_id"]
76
+ availity_eligibility_id = struct["availity_eligibility_id"]
77
+ availity_remittance_payer_id = struct["availity_remittance_payer_id"]
47
78
  new(
48
79
  payer_uuid: payer_uuid,
49
80
  payer_id: payer_id,
50
81
  payer_name: payer_name,
82
+ availity_payer_name: availity_payer_name,
83
+ availity_claims_payer_id: availity_claims_payer_id,
84
+ availity_eligibility_id: availity_eligibility_id,
85
+ availity_remittance_payer_id: availity_remittance_payer_id,
51
86
  additional_properties: struct
52
87
  )
53
88
  end
@@ -69,6 +104,10 @@ module CandidApiClient
69
104
  obj.payer_uuid.is_a?(String) != false || raise("Passed value for field obj.payer_uuid is not the expected type, validation failed.")
70
105
  obj.payer_id.is_a?(String) != false || raise("Passed value for field obj.payer_id is not the expected type, validation failed.")
71
106
  obj.payer_name.is_a?(String) != false || raise("Passed value for field obj.payer_name is not the expected type, validation failed.")
107
+ obj.availity_payer_name&.is_a?(String) != false || raise("Passed value for field obj.availity_payer_name is not the expected type, validation failed.")
108
+ obj.availity_claims_payer_id&.is_a?(String) != false || raise("Passed value for field obj.availity_claims_payer_id is not the expected type, validation failed.")
109
+ obj.availity_eligibility_id&.is_a?(String) != false || raise("Passed value for field obj.availity_eligibility_id is not the expected type, validation failed.")
110
+ obj.availity_remittance_payer_id&.is_a?(String) != false || raise("Passed value for field obj.availity_remittance_payer_id is not the expected type, validation failed.")
72
111
  end
73
112
  end
74
113
  end
@@ -30,6 +30,22 @@ module CandidApiClient
30
30
  # * :service_duration (Integer)
31
31
  # * :services (Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Service>)
32
32
  # * :placer_appointment_id (String)
33
+ # * :attending_doctor (Hash)
34
+ # * :name (Hash)
35
+ # * :family (String)
36
+ # * :given (Array<String>)
37
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
38
+ # * :period (Hash)
39
+ # * :start (Date)
40
+ # * :end_ (Date)
41
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
42
+ # * :npi (String)
43
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
44
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
45
+ # * :period (Hash)
46
+ # * :start (Date)
47
+ # * :end_ (Date)
48
+ # * :canonical_id (String)
33
49
  # * :estimated_copay_cents (Integer)
34
50
  # * :estimated_patient_responsibility_cents (Integer)
35
51
  # * :patient_deposit_cents (Integer)
@@ -42,7 +58,7 @@ module CandidApiClient
42
58
  # @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
43
59
  # @example
44
60
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
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 })
61
+ # 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", 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" }, 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 })
46
62
  def create(request:, request_options: nil)
47
63
  response = @request_client.conn.post do |req|
48
64
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -122,6 +138,22 @@ module CandidApiClient
122
138
  # * :service_duration (Integer)
123
139
  # * :services (Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Service>)
124
140
  # * :placer_appointment_id (String)
141
+ # * :attending_doctor (Hash)
142
+ # * :name (Hash)
143
+ # * :family (String)
144
+ # * :given (Array<String>)
145
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
146
+ # * :period (Hash)
147
+ # * :start (Date)
148
+ # * :end_ (Date)
149
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
150
+ # * :npi (String)
151
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
152
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
153
+ # * :period (Hash)
154
+ # * :start (Date)
155
+ # * :end_ (Date)
156
+ # * :canonical_id (String)
125
157
  # * :estimated_copay_cents (Integer)
126
158
  # * :estimated_patient_responsibility_cents (Integer)
127
159
  # * :patient_deposit_cents (Integer)
@@ -137,7 +169,7 @@ module CandidApiClient
137
169
  # api.pre_encounter.appointments.v_1.update(
138
170
  # id: "string",
139
171
  # version: "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 }
172
+ # 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", 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" }, 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 }
141
173
  # )
142
174
  def update(id:, version:, request:, request_options: nil)
143
175
  response = @request_client.conn.put do |req|
@@ -202,6 +234,22 @@ module CandidApiClient
202
234
  # * :service_duration (Integer)
203
235
  # * :services (Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Service>)
204
236
  # * :placer_appointment_id (String)
237
+ # * :attending_doctor (Hash)
238
+ # * :name (Hash)
239
+ # * :family (String)
240
+ # * :given (Array<String>)
241
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
242
+ # * :period (Hash)
243
+ # * :start (Date)
244
+ # * :end_ (Date)
245
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
246
+ # * :npi (String)
247
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
248
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
249
+ # * :period (Hash)
250
+ # * :start (Date)
251
+ # * :end_ (Date)
252
+ # * :canonical_id (String)
205
253
  # * :estimated_copay_cents (Integer)
206
254
  # * :estimated_patient_responsibility_cents (Integer)
207
255
  # * :patient_deposit_cents (Integer)
@@ -214,7 +262,7 @@ module CandidApiClient
214
262
  # @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
215
263
  # @example
216
264
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
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 })
265
+ # 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", 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" }, 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 })
218
266
  def create(request:, request_options: nil)
219
267
  Async do
220
268
  response = @request_client.conn.post do |req|
@@ -300,6 +348,22 @@ module CandidApiClient
300
348
  # * :service_duration (Integer)
301
349
  # * :services (Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Service>)
302
350
  # * :placer_appointment_id (String)
351
+ # * :attending_doctor (Hash)
352
+ # * :name (Hash)
353
+ # * :family (String)
354
+ # * :given (Array<String>)
355
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
356
+ # * :period (Hash)
357
+ # * :start (Date)
358
+ # * :end_ (Date)
359
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
360
+ # * :npi (String)
361
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
362
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
363
+ # * :period (Hash)
364
+ # * :start (Date)
365
+ # * :end_ (Date)
366
+ # * :canonical_id (String)
303
367
  # * :estimated_copay_cents (Integer)
304
368
  # * :estimated_patient_responsibility_cents (Integer)
305
369
  # * :patient_deposit_cents (Integer)
@@ -315,7 +379,7 @@ module CandidApiClient
315
379
  # api.pre_encounter.appointments.v_1.update(
316
380
  # id: "string",
317
381
  # version: "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 }
382
+ # 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", 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" }, 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 }
319
383
  # )
320
384
  def update(id:, version:, request:, request_options: nil)
321
385
  Async do
@@ -3,6 +3,7 @@
3
3
  require "date"
4
4
  require_relative "appointment_status"
5
5
  require_relative "service"
6
+ require_relative "../../../common/types/external_provider"
6
7
  require_relative "appointment_work_queue"
7
8
  require "ostruct"
8
9
  require "json"
@@ -45,6 +46,9 @@ module CandidApiClient
45
46
  attr_reader :services
46
47
  # @return [String] ID for the appointment/order for the event.
47
48
  attr_reader :placer_appointment_id
49
+ # @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider] Attending physician information. The attending physician will be stored as the
50
+ # Current MD for the patient.
51
+ attr_reader :attending_doctor
48
52
  # @return [Integer]
49
53
  attr_reader :estimated_copay_cents
50
54
  # @return [Integer]
@@ -96,6 +100,8 @@ module CandidApiClient
96
100
  # minutes.
97
101
  # @param services [Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Service>]
98
102
  # @param placer_appointment_id [String] ID for the appointment/order for the event.
103
+ # @param attending_doctor [CandidApiClient::PreEncounter::Common::Types::ExternalProvider] Attending physician information. The attending physician will be stored as the
104
+ # Current MD for the patient.
99
105
  # @param estimated_copay_cents [Integer]
100
106
  # @param estimated_patient_responsibility_cents [Integer]
101
107
  # @param patient_deposit_cents [Integer]
@@ -115,7 +121,7 @@ module CandidApiClient
115
121
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
116
122
  # @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
117
123
  def initialize(id:, organization_id:, deactivated:, version:, updated_at:, updating_user_id:, patient_id:,
118
- start_timestamp:, service_duration:, services:, status: OMIT, placer_appointment_id: OMIT, estimated_copay_cents: OMIT, estimated_patient_responsibility_cents: OMIT, patient_deposit_cents: OMIT, checked_in_timestamp: OMIT, notes: OMIT, location_resource_id: OMIT, automated_eligibility_check_complete: OMIT, work_queue: OMIT, additional_properties: nil)
124
+ start_timestamp:, service_duration:, services:, status: OMIT, placer_appointment_id: OMIT, attending_doctor: OMIT, estimated_copay_cents: OMIT, estimated_patient_responsibility_cents: OMIT, patient_deposit_cents: OMIT, checked_in_timestamp: OMIT, notes: OMIT, location_resource_id: OMIT, automated_eligibility_check_complete: OMIT, work_queue: OMIT, additional_properties: nil)
119
125
  @id = id
120
126
  @organization_id = organization_id
121
127
  @deactivated = deactivated
@@ -128,6 +134,7 @@ module CandidApiClient
128
134
  @service_duration = service_duration
129
135
  @services = services
130
136
  @placer_appointment_id = placer_appointment_id if placer_appointment_id != OMIT
137
+ @attending_doctor = attending_doctor if attending_doctor != OMIT
131
138
  @estimated_copay_cents = estimated_copay_cents if estimated_copay_cents != OMIT
132
139
  if estimated_patient_responsibility_cents != OMIT
133
140
  @estimated_patient_responsibility_cents = estimated_patient_responsibility_cents
@@ -154,6 +161,7 @@ module CandidApiClient
154
161
  "service_duration": service_duration,
155
162
  "services": services,
156
163
  "placer_appointment_id": placer_appointment_id,
164
+ "attending_doctor": attending_doctor,
157
165
  "estimated_copay_cents": estimated_copay_cents,
158
166
  "estimated_patient_responsibility_cents": estimated_patient_responsibility_cents,
159
167
  "patient_deposit_cents": patient_deposit_cents,
@@ -191,6 +199,12 @@ module CandidApiClient
191
199
  CandidApiClient::PreEncounter::Appointments::V1::Types::Service.from_json(json_object: item)
192
200
  end
193
201
  placer_appointment_id = struct["placer_appointment_id"]
202
+ if parsed_json["attending_doctor"].nil?
203
+ attending_doctor = nil
204
+ else
205
+ attending_doctor = parsed_json["attending_doctor"].to_json
206
+ attending_doctor = CandidApiClient::PreEncounter::Common::Types::ExternalProvider.from_json(json_object: attending_doctor)
207
+ end
194
208
  estimated_copay_cents = struct["estimated_copay_cents"]
195
209
  estimated_patient_responsibility_cents = struct["estimated_patient_responsibility_cents"]
196
210
  patient_deposit_cents = struct["patient_deposit_cents"]
@@ -214,6 +228,7 @@ module CandidApiClient
214
228
  service_duration: service_duration,
215
229
  services: services,
216
230
  placer_appointment_id: placer_appointment_id,
231
+ attending_doctor: attending_doctor,
217
232
  estimated_copay_cents: estimated_copay_cents,
218
233
  estimated_patient_responsibility_cents: estimated_patient_responsibility_cents,
219
234
  patient_deposit_cents: patient_deposit_cents,
@@ -252,6 +267,7 @@ module CandidApiClient
252
267
  obj.service_duration.is_a?(Integer) != false || raise("Passed value for field obj.service_duration is not the expected type, validation failed.")
253
268
  obj.services.is_a?(Array) != false || raise("Passed value for field obj.services is not the expected type, validation failed.")
254
269
  obj.placer_appointment_id&.is_a?(String) != false || raise("Passed value for field obj.placer_appointment_id is not the expected type, validation failed.")
270
+ obj.attending_doctor.nil? || CandidApiClient::PreEncounter::Common::Types::ExternalProvider.validate_raw(obj: obj.attending_doctor)
255
271
  obj.estimated_copay_cents&.is_a?(Integer) != false || raise("Passed value for field obj.estimated_copay_cents is not the expected type, validation failed.")
256
272
  obj.estimated_patient_responsibility_cents&.is_a?(Integer) != false || raise("Passed value for field obj.estimated_patient_responsibility_cents is not the expected type, validation failed.")
257
273
  obj.patient_deposit_cents&.is_a?(Integer) != false || raise("Passed value for field obj.patient_deposit_cents is not the expected type, validation failed.")
@@ -3,6 +3,7 @@
3
3
  require "date"
4
4
  require_relative "appointment_status"
5
5
  require_relative "service"
6
+ require_relative "../../../common/types/external_provider"
6
7
  require_relative "appointment_work_queue"
7
8
  require "ostruct"
8
9
  require "json"
@@ -30,6 +31,9 @@ module CandidApiClient
30
31
  attr_reader :services
31
32
  # @return [String] ID for the appointment/order for the event.
32
33
  attr_reader :placer_appointment_id
34
+ # @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider] Attending physician information. The attending physician will be stored as the
35
+ # Current MD for the patient.
36
+ attr_reader :attending_doctor
33
37
  # @return [Integer]
34
38
  attr_reader :estimated_copay_cents
35
39
  # @return [Integer]
@@ -72,6 +76,8 @@ module CandidApiClient
72
76
  # minutes.
73
77
  # @param services [Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Service>]
74
78
  # @param placer_appointment_id [String] ID for the appointment/order for the event.
79
+ # @param attending_doctor [CandidApiClient::PreEncounter::Common::Types::ExternalProvider] Attending physician information. The attending physician will be stored as the
80
+ # Current MD for the patient.
75
81
  # @param estimated_copay_cents [Integer]
76
82
  # @param estimated_patient_responsibility_cents [Integer]
77
83
  # @param patient_deposit_cents [Integer]
@@ -91,13 +97,14 @@ module CandidApiClient
91
97
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
92
98
  # @return [CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment]
93
99
  def initialize(patient_id:, start_timestamp:, service_duration:, services:, status: OMIT,
94
- placer_appointment_id: OMIT, estimated_copay_cents: OMIT, estimated_patient_responsibility_cents: OMIT, patient_deposit_cents: OMIT, checked_in_timestamp: OMIT, notes: OMIT, location_resource_id: OMIT, automated_eligibility_check_complete: OMIT, work_queue: OMIT, additional_properties: nil)
100
+ placer_appointment_id: OMIT, attending_doctor: OMIT, estimated_copay_cents: OMIT, estimated_patient_responsibility_cents: OMIT, patient_deposit_cents: OMIT, checked_in_timestamp: OMIT, notes: OMIT, location_resource_id: OMIT, automated_eligibility_check_complete: OMIT, work_queue: OMIT, additional_properties: nil)
95
101
  @patient_id = patient_id
96
102
  @start_timestamp = start_timestamp
97
103
  @status = status if status != OMIT
98
104
  @service_duration = service_duration
99
105
  @services = services
100
106
  @placer_appointment_id = placer_appointment_id if placer_appointment_id != OMIT
107
+ @attending_doctor = attending_doctor if attending_doctor != OMIT
101
108
  @estimated_copay_cents = estimated_copay_cents if estimated_copay_cents != OMIT
102
109
  if estimated_patient_responsibility_cents != OMIT
103
110
  @estimated_patient_responsibility_cents = estimated_patient_responsibility_cents
@@ -118,6 +125,7 @@ module CandidApiClient
118
125
  "service_duration": service_duration,
119
126
  "services": services,
120
127
  "placer_appointment_id": placer_appointment_id,
128
+ "attending_doctor": attending_doctor,
121
129
  "estimated_copay_cents": estimated_copay_cents,
122
130
  "estimated_patient_responsibility_cents": estimated_patient_responsibility_cents,
123
131
  "patient_deposit_cents": patient_deposit_cents,
@@ -149,6 +157,12 @@ module CandidApiClient
149
157
  CandidApiClient::PreEncounter::Appointments::V1::Types::Service.from_json(json_object: item)
150
158
  end
151
159
  placer_appointment_id = struct["placer_appointment_id"]
160
+ if parsed_json["attending_doctor"].nil?
161
+ attending_doctor = nil
162
+ else
163
+ attending_doctor = parsed_json["attending_doctor"].to_json
164
+ attending_doctor = CandidApiClient::PreEncounter::Common::Types::ExternalProvider.from_json(json_object: attending_doctor)
165
+ end
152
166
  estimated_copay_cents = struct["estimated_copay_cents"]
153
167
  estimated_patient_responsibility_cents = struct["estimated_patient_responsibility_cents"]
154
168
  patient_deposit_cents = struct["patient_deposit_cents"]
@@ -166,6 +180,7 @@ module CandidApiClient
166
180
  service_duration: service_duration,
167
181
  services: services,
168
182
  placer_appointment_id: placer_appointment_id,
183
+ attending_doctor: attending_doctor,
169
184
  estimated_copay_cents: estimated_copay_cents,
170
185
  estimated_patient_responsibility_cents: estimated_patient_responsibility_cents,
171
186
  patient_deposit_cents: patient_deposit_cents,
@@ -198,6 +213,7 @@ module CandidApiClient
198
213
  obj.service_duration.is_a?(Integer) != false || raise("Passed value for field obj.service_duration is not the expected type, validation failed.")
199
214
  obj.services.is_a?(Array) != false || raise("Passed value for field obj.services is not the expected type, validation failed.")
200
215
  obj.placer_appointment_id&.is_a?(String) != false || raise("Passed value for field obj.placer_appointment_id is not the expected type, validation failed.")
216
+ obj.attending_doctor.nil? || CandidApiClient::PreEncounter::Common::Types::ExternalProvider.validate_raw(obj: obj.attending_doctor)
201
217
  obj.estimated_copay_cents&.is_a?(Integer) != false || raise("Passed value for field obj.estimated_copay_cents is not the expected type, validation failed.")
202
218
  obj.estimated_patient_responsibility_cents&.is_a?(Integer) != false || raise("Passed value for field obj.estimated_patient_responsibility_cents is not the expected type, validation failed.")
203
219
  obj.patient_deposit_cents&.is_a?(Integer) != false || raise("Passed value for field obj.patient_deposit_cents is not the expected type, validation failed.")
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module CandidApiClient
7
+ module PreEncounter
8
+ module Common
9
+ module Types
10
+ class AdditionalPayerInformation
11
+ # @return [String]
12
+ attr_reader :availity_eligibility_id
13
+ # @return [String]
14
+ attr_reader :availity_payer_id
15
+ # @return [String]
16
+ attr_reader :availity_payer_name
17
+ # @return [String]
18
+ attr_reader :availity_remittance_payer_id
19
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
20
+ attr_reader :additional_properties
21
+ # @return [Object]
22
+ attr_reader :_field_set
23
+ protected :_field_set
24
+
25
+ OMIT = Object.new
26
+
27
+ # @param availity_eligibility_id [String]
28
+ # @param availity_payer_id [String]
29
+ # @param availity_payer_name [String]
30
+ # @param availity_remittance_payer_id [String]
31
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
32
+ # @return [CandidApiClient::PreEncounter::Common::Types::AdditionalPayerInformation]
33
+ def initialize(availity_eligibility_id: OMIT, availity_payer_id: OMIT, availity_payer_name: OMIT,
34
+ availity_remittance_payer_id: OMIT, additional_properties: nil)
35
+ @availity_eligibility_id = availity_eligibility_id if availity_eligibility_id != OMIT
36
+ @availity_payer_id = availity_payer_id if availity_payer_id != OMIT
37
+ @availity_payer_name = availity_payer_name if availity_payer_name != OMIT
38
+ @availity_remittance_payer_id = availity_remittance_payer_id if availity_remittance_payer_id != OMIT
39
+ @additional_properties = additional_properties
40
+ @_field_set = {
41
+ "availity_eligibility_id": availity_eligibility_id,
42
+ "availity_payer_id": availity_payer_id,
43
+ "availity_payer_name": availity_payer_name,
44
+ "availity_remittance_payer_id": availity_remittance_payer_id
45
+ }.reject do |_k, v|
46
+ v == OMIT
47
+ end
48
+ end
49
+
50
+ # Deserialize a JSON object to an instance of AdditionalPayerInformation
51
+ #
52
+ # @param json_object [String]
53
+ # @return [CandidApiClient::PreEncounter::Common::Types::AdditionalPayerInformation]
54
+ def self.from_json(json_object:)
55
+ struct = JSON.parse(json_object, object_class: OpenStruct)
56
+ availity_eligibility_id = struct["availity_eligibility_id"]
57
+ availity_payer_id = struct["availity_payer_id"]
58
+ availity_payer_name = struct["availity_payer_name"]
59
+ availity_remittance_payer_id = struct["availity_remittance_payer_id"]
60
+ new(
61
+ availity_eligibility_id: availity_eligibility_id,
62
+ availity_payer_id: availity_payer_id,
63
+ availity_payer_name: availity_payer_name,
64
+ availity_remittance_payer_id: availity_remittance_payer_id,
65
+ additional_properties: struct
66
+ )
67
+ end
68
+
69
+ # Serialize an instance of AdditionalPayerInformation to a JSON object
70
+ #
71
+ # @return [String]
72
+ def to_json(*_args)
73
+ @_field_set&.to_json
74
+ end
75
+
76
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
77
+ # hash and check each fields type against the current object's property
78
+ # definitions.
79
+ #
80
+ # @param obj [Object]
81
+ # @return [Void]
82
+ def self.validate_raw(obj:)
83
+ obj.availity_eligibility_id&.is_a?(String) != false || raise("Passed value for field obj.availity_eligibility_id is not the expected type, validation failed.")
84
+ obj.availity_payer_id&.is_a?(String) != false || raise("Passed value for field obj.availity_payer_id is not the expected type, validation failed.")
85
+ obj.availity_payer_name&.is_a?(String) != false || raise("Passed value for field obj.availity_payer_name is not the expected type, validation failed.")
86
+ obj.availity_remittance_payer_id&.is_a?(String) != false || raise("Passed value for field obj.availity_remittance_payer_id is not the expected type, validation failed.")
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end