candidhealth 1.0.0 → 1.3.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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/client.rb +7 -7
  3. data/lib/candidhealth/auth/{v_2 → default}/client.rb +39 -13
  4. data/lib/candidhealth/auth/{v_2 → default}/types/auth_get_token_response.rb +3 -3
  5. data/lib/candidhealth/auth/default/types/invalid_content_type_error_type.rb +60 -0
  6. data/lib/candidhealth/auth/{v_2 → default}/types/too_many_requests_error_type.rb +3 -3
  7. data/lib/candidhealth/billing_notes/v_2/types/billing_note_base_optional.rb +62 -0
  8. data/lib/candidhealth/charge_capture/v_1/client.rb +504 -482
  9. data/lib/candidhealth/charge_capture/v_1/types/charge_capture.rb +17 -1
  10. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +173 -173
  11. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb +26 -2
  12. data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +58 -0
  13. data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +100 -0
  14. data/lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create_optional.rb +101 -0
  15. data/lib/candidhealth/commons/types/phone_number_optional.rb +71 -0
  16. data/lib/candidhealth/commons/types/procedure_modifier.rb +2 -0
  17. data/lib/candidhealth/commons/types/street_address_long_zip_optional.rb +107 -0
  18. data/lib/candidhealth/custom_schemas/v_1/types/schema_instance_optional.rb +78 -0
  19. data/lib/candidhealth/diagnoses/client.rb +23 -4
  20. data/lib/candidhealth/diagnoses/types/diagnosis.rb +21 -2
  21. data/lib/candidhealth/diagnoses/types/diagnosis_create.rb +25 -2
  22. data/lib/candidhealth/diagnoses/types/diagnosis_create_optional.rb +126 -0
  23. data/lib/candidhealth/diagnoses/types/standalone_diagnosis_create.rb +22 -2
  24. data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_optional.rb +123 -0
  25. data/lib/candidhealth/encounters/v_4/client.rb +214 -208
  26. data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information_optional.rb +86 -0
  27. data/lib/candidhealth/encounters/v_4/types/clinical_note_category_create_optional.rb +78 -0
  28. data/lib/candidhealth/encounters/v_4/types/clinical_note_optional.rb +93 -0
  29. data/lib/candidhealth/encounters/v_4/types/encounter.rb +16 -4
  30. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +4 -2
  31. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +780 -0
  32. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +1 -139
  33. data/lib/candidhealth/encounters/v_4/types/epsdt_referral_optional.rb +85 -0
  34. data/lib/candidhealth/encounters/v_4/types/intake_question_optional.rb +84 -0
  35. data/lib/candidhealth/encounters/v_4/types/intervention_optional.rb +114 -0
  36. data/lib/candidhealth/encounters/v_4/types/lab_optional.rb +80 -0
  37. data/lib/candidhealth/encounters/v_4/types/medication_optional.rb +108 -0
  38. data/lib/candidhealth/encounters/v_4/types/patient_history_category_optional.rb +78 -0
  39. data/lib/candidhealth/guarantor/v_1/types/guarantor_optional.rb +144 -0
  40. data/lib/candidhealth/individual/types/individual_base_optional.rb +78 -0
  41. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create_optional.rb +89 -0
  42. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +8 -8
  43. data/lib/candidhealth/individual/types/subscriber_base_optional.rb +118 -0
  44. data/lib/candidhealth/individual/types/subscriber_create_optional.rb +132 -0
  45. data/lib/candidhealth/insurance_adjudications/v_1/client.rb +2 -0
  46. data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_create.rb +9 -1
  47. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create_optional.rb +167 -0
  48. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +13 -1
  49. data/lib/candidhealth/service_lines/v_2/types/drug_identification_optional.rb +126 -0
  50. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +239 -0
  51. data/lib/candidhealth/service_lines/v_2/types/test_result_optional.rb +73 -0
  52. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_reason.rb +1 -0
  53. data/lib/candidhealth/write_offs/v_1/types/patient_write_off_reason.rb +1 -0
  54. data/lib/candidhealth/yes_no_indicator/types/yes_no_indicator.rb +14 -0
  55. data/lib/core/oauth.rb +2 -2
  56. data/lib/requests.rb +2 -2
  57. data/lib/types_export.rb +32 -3
  58. metadata +34 -5
@@ -1,20 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "date"
4
- require_relative "clinical_note_category_create"
5
4
  require_relative "billable_status_type"
6
5
  require_relative "responsible_party_type"
7
6
  require_relative "synchronicity_type"
8
7
  require_relative "../../../commons/types/facility_type_code"
9
- require_relative "../../../individual/types/subscriber_create"
10
8
  require_relative "service_authorization_exception_code"
11
9
  require_relative "../../../commons/types/delay_reason_code"
12
- require_relative "../../../custom_schemas/v_1/types/schema_instance"
13
10
  require_relative "vitals_update"
14
- require_relative "medication"
15
- require_relative "../../../guarantor/v_1/types/guarantor_update"
16
- require_relative "epsdt_referral"
17
- require_relative "claim_supplemental_information"
18
11
  require "ostruct"
19
12
  require "json"
20
13
 
@@ -45,9 +38,6 @@ module CandidApiClient
45
38
  # @return [Array<String>] Names of tags that should be on the encounter. Note all tags on encounter will
46
39
  # be overridden with this list.
47
40
  attr_reader :tag_ids
48
- # @return [Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>] Holds a collection of clinical observations made by healthcare providers during
49
- # patient encounters.
50
- attr_reader :clinical_notes
51
41
  # @return [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
52
42
  # Examples for when this should be set to NOT_BILLABLE include if the Encounter
53
43
  # has not occurred yet or if there is no intention of ever billing the
@@ -81,12 +71,6 @@ module CandidApiClient
81
71
  # end_date_of_service values are the same, updating the encounter's
82
72
  # end_date_of_service will update all service line date_of_service values.
83
73
  attr_reader :end_date_of_service
84
- # @return [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the primary insurance subscriber.
85
- attr_reader :subscriber_primary
86
- # @return [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the secondary insurance subscriber.
87
- attr_reader :subscriber_secondary
88
- # @return [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the tertiary insurance subscriber.
89
- attr_reader :subscriber_tertiary
90
74
  # @return [String] Defines additional information on the claim needed by the payer.
91
75
  # Box 19 on the CMS-1500 claim form.
92
76
  attr_reader :additional_information
@@ -125,32 +109,12 @@ module CandidApiClient
125
109
  # for billing purpose.
126
110
  # Box 12 on the CMS-1500 claim form.
127
111
  attr_reader :patient_authorized_release
128
- # @return [Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
129
- # Multiple schema
130
- # instances cannot be created for the same schema on an encounter. Updating schema
131
- # instances utilizes PUT
132
- # semantics, so the schema instances on the encounter will be set to whatever
133
- # inputs are provided. If null
134
- # is provided as an input, then the encounter's schema instances will be cleared.
135
- attr_reader :schema_instances
136
112
  # @return [CandidApiClient::Encounters::V4::Types::VitalsUpdate] If a vitals entity already exists for the encounter, then all values will be
137
113
  # updated to the provided values.
138
114
  # Otherwise, a new vitals object will be created for the encounter.
139
115
  attr_reader :vitals
140
- # @return [Array<CandidApiClient::Encounters::V4::Types::Medication>] Existing medications that should be on the encounter.
141
- # Note all current existing medications on encounter will be overridden with this
142
- # list.
143
- attr_reader :existing_medications
144
- # @return [CandidApiClient::Guarantor::V1::Types::GuarantorUpdate] Personal and contact info for the guarantor of the patient responsibility.
145
- attr_reader :guarantor
146
116
  # @return [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
147
117
  attr_reader :referral_number
148
- # @return [CandidApiClient::Encounters::V4::Types::EpsdtReferral] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
149
- # 837P form
150
- attr_reader :epsdt_referral
151
- # @return [Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>] Refers to Loop 2300 - Segment PWK on the 837P form. No more than 10 entries are
152
- # permitted.
153
- attr_reader :claim_supplemental_information
154
118
  # @return [String] When Medicaid is billed as the secondary payer the Carrier Code is used to
155
119
  # identify the primary payer. This is required for certain states.
156
120
  attr_reader :secondary_payer_carrier_code
@@ -179,8 +143,6 @@ module CandidApiClient
179
143
  # date_of_service values.
180
144
  # @param tag_ids [Array<String>] Names of tags that should be on the encounter. Note all tags on encounter will
181
145
  # be overridden with this list.
182
- # @param clinical_notes [Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>] Holds a collection of clinical observations made by healthcare providers during
183
- # patient encounters.
184
146
  # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
185
147
  # Examples for when this should be set to NOT_BILLABLE include if the Encounter
186
148
  # has not occurred yet or if there is no intention of ever billing the
@@ -207,9 +169,6 @@ module CandidApiClient
207
169
  # encounter's end_date_of_service will fail. If all service line
208
170
  # end_date_of_service values are the same, updating the encounter's
209
171
  # end_date_of_service will update all service line date_of_service values.
210
- # @param subscriber_primary [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the primary insurance subscriber.
211
- # @param subscriber_secondary [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the secondary insurance subscriber.
212
- # @param subscriber_tertiary [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the tertiary insurance subscriber.
213
172
  # @param additional_information [String] Defines additional information on the claim needed by the payer.
214
173
  # Box 19 on the CMS-1500 claim form.
215
174
  # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
@@ -240,37 +199,21 @@ module CandidApiClient
240
199
  # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
241
200
  # for billing purpose.
242
201
  # Box 12 on the CMS-1500 claim form.
243
- # @param schema_instances [Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
244
- # Multiple schema
245
- # instances cannot be created for the same schema on an encounter. Updating schema
246
- # instances utilizes PUT
247
- # semantics, so the schema instances on the encounter will be set to whatever
248
- # inputs are provided. If null
249
- # is provided as an input, then the encounter's schema instances will be cleared.
250
202
  # @param vitals [CandidApiClient::Encounters::V4::Types::VitalsUpdate] If a vitals entity already exists for the encounter, then all values will be
251
203
  # updated to the provided values.
252
204
  # Otherwise, a new vitals object will be created for the encounter.
253
- # @param existing_medications [Array<CandidApiClient::Encounters::V4::Types::Medication>] Existing medications that should be on the encounter.
254
- # Note all current existing medications on encounter will be overridden with this
255
- # list.
256
- # @param guarantor [CandidApiClient::Guarantor::V1::Types::GuarantorUpdate] Personal and contact info for the guarantor of the patient responsibility.
257
205
  # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
258
- # @param epsdt_referral [CandidApiClient::Encounters::V4::Types::EpsdtReferral] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
259
- # 837P form
260
- # @param claim_supplemental_information [Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>] Refers to Loop 2300 - Segment PWK on the 837P form. No more than 10 entries are
261
- # permitted.
262
206
  # @param secondary_payer_carrier_code [String] When Medicaid is billed as the secondary payer the Carrier Code is used to
263
207
  # identify the primary payer. This is required for certain states.
264
208
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
265
209
  # @return [CandidApiClient::Encounters::V4::Types::EncounterOptional]
266
210
  def initialize(benefits_assigned_to_provider: OMIT, prior_authorization_number: OMIT, external_id: OMIT,
267
- date_of_service: OMIT, tag_ids: OMIT, clinical_notes: OMIT, billable_status: OMIT, responsible_party: OMIT, provider_accepts_assignment: OMIT, synchronicity: OMIT, place_of_service_code: OMIT, appointment_type: OMIT, end_date_of_service: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, subscriber_tertiary: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, patient_authorized_release: OMIT, schema_instances: OMIT, vitals: OMIT, existing_medications: OMIT, guarantor: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, secondary_payer_carrier_code: OMIT, additional_properties: nil)
211
+ date_of_service: OMIT, tag_ids: OMIT, billable_status: OMIT, responsible_party: OMIT, provider_accepts_assignment: OMIT, synchronicity: OMIT, place_of_service_code: OMIT, appointment_type: OMIT, end_date_of_service: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, patient_authorized_release: OMIT, vitals: OMIT, referral_number: OMIT, secondary_payer_carrier_code: OMIT, additional_properties: nil)
268
212
  @benefits_assigned_to_provider = benefits_assigned_to_provider if benefits_assigned_to_provider != OMIT
269
213
  @prior_authorization_number = prior_authorization_number if prior_authorization_number != OMIT
270
214
  @external_id = external_id if external_id != OMIT
271
215
  @date_of_service = date_of_service if date_of_service != OMIT
272
216
  @tag_ids = tag_ids if tag_ids != OMIT
273
- @clinical_notes = clinical_notes if clinical_notes != OMIT
274
217
  @billable_status = billable_status if billable_status != OMIT
275
218
  @responsible_party = responsible_party if responsible_party != OMIT
276
219
  @provider_accepts_assignment = provider_accepts_assignment if provider_accepts_assignment != OMIT
@@ -278,9 +221,6 @@ module CandidApiClient
278
221
  @place_of_service_code = place_of_service_code if place_of_service_code != OMIT
279
222
  @appointment_type = appointment_type if appointment_type != OMIT
280
223
  @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
281
- @subscriber_primary = subscriber_primary if subscriber_primary != OMIT
282
- @subscriber_secondary = subscriber_secondary if subscriber_secondary != OMIT
283
- @subscriber_tertiary = subscriber_tertiary if subscriber_tertiary != OMIT
284
224
  @additional_information = additional_information if additional_information != OMIT
285
225
  if service_authorization_exception_code != OMIT
286
226
  @service_authorization_exception_code = service_authorization_exception_code
@@ -293,13 +233,8 @@ module CandidApiClient
293
233
  @last_menstrual_period_date = last_menstrual_period_date if last_menstrual_period_date != OMIT
294
234
  @delay_reason_code = delay_reason_code if delay_reason_code != OMIT
295
235
  @patient_authorized_release = patient_authorized_release if patient_authorized_release != OMIT
296
- @schema_instances = schema_instances if schema_instances != OMIT
297
236
  @vitals = vitals if vitals != OMIT
298
- @existing_medications = existing_medications if existing_medications != OMIT
299
- @guarantor = guarantor if guarantor != OMIT
300
237
  @referral_number = referral_number if referral_number != OMIT
301
- @epsdt_referral = epsdt_referral if epsdt_referral != OMIT
302
- @claim_supplemental_information = claim_supplemental_information if claim_supplemental_information != OMIT
303
238
  @secondary_payer_carrier_code = secondary_payer_carrier_code if secondary_payer_carrier_code != OMIT
304
239
  @additional_properties = additional_properties
305
240
  @_field_set = {
@@ -308,7 +243,6 @@ module CandidApiClient
308
243
  "external_id": external_id,
309
244
  "date_of_service": date_of_service,
310
245
  "tag_ids": tag_ids,
311
- "clinical_notes": clinical_notes,
312
246
  "billable_status": billable_status,
313
247
  "responsible_party": responsible_party,
314
248
  "provider_accepts_assignment": provider_accepts_assignment,
@@ -316,9 +250,6 @@ module CandidApiClient
316
250
  "place_of_service_code": place_of_service_code,
317
251
  "appointment_type": appointment_type,
318
252
  "end_date_of_service": end_date_of_service,
319
- "subscriber_primary": subscriber_primary,
320
- "subscriber_secondary": subscriber_secondary,
321
- "subscriber_tertiary": subscriber_tertiary,
322
253
  "additional_information": additional_information,
323
254
  "service_authorization_exception_code": service_authorization_exception_code,
324
255
  "admission_date": admission_date,
@@ -327,13 +258,8 @@ module CandidApiClient
327
258
  "last_menstrual_period_date": last_menstrual_period_date,
328
259
  "delay_reason_code": delay_reason_code,
329
260
  "patient_authorized_release": patient_authorized_release,
330
- "schema_instances": schema_instances,
331
261
  "vitals": vitals,
332
- "existing_medications": existing_medications,
333
- "guarantor": guarantor,
334
262
  "referral_number": referral_number,
335
- "epsdt_referral": epsdt_referral,
336
- "claim_supplemental_information": claim_supplemental_information,
337
263
  "secondary_payer_carrier_code": secondary_payer_carrier_code
338
264
  }.reject do |_k, v|
339
265
  v == OMIT
@@ -352,10 +278,6 @@ module CandidApiClient
352
278
  external_id = struct["external_id"]
353
279
  date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
354
280
  tag_ids = struct["tag_ids"]
355
- clinical_notes = parsed_json["clinical_notes"]&.map do |item|
356
- item = item.to_json
357
- CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate.from_json(json_object: item)
358
- end
359
281
  billable_status = struct["billable_status"]
360
282
  responsible_party = struct["responsible_party"]
361
283
  provider_accepts_assignment = struct["provider_accepts_assignment"]
@@ -365,24 +287,6 @@ module CandidApiClient
365
287
  end_date_of_service = unless parsed_json["end_date_of_service"].nil?
366
288
  Date.parse(parsed_json["end_date_of_service"])
367
289
  end
368
- if parsed_json["subscriber_primary"].nil?
369
- subscriber_primary = nil
370
- else
371
- subscriber_primary = parsed_json["subscriber_primary"].to_json
372
- subscriber_primary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_primary)
373
- end
374
- if parsed_json["subscriber_secondary"].nil?
375
- subscriber_secondary = nil
376
- else
377
- subscriber_secondary = parsed_json["subscriber_secondary"].to_json
378
- subscriber_secondary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_secondary)
379
- end
380
- if parsed_json["subscriber_tertiary"].nil?
381
- subscriber_tertiary = nil
382
- else
383
- subscriber_tertiary = parsed_json["subscriber_tertiary"].to_json
384
- subscriber_tertiary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_tertiary)
385
- end
386
290
  additional_information = struct["additional_information"]
387
291
  service_authorization_exception_code = struct["service_authorization_exception_code"]
388
292
  admission_date = (Date.parse(parsed_json["admission_date"]) unless parsed_json["admission_date"].nil?)
@@ -395,37 +299,13 @@ module CandidApiClient
395
299
  end
396
300
  delay_reason_code = struct["delay_reason_code"]
397
301
  patient_authorized_release = struct["patient_authorized_release"]
398
- schema_instances = parsed_json["schema_instances"]&.map do |item|
399
- item = item.to_json
400
- CandidApiClient::CustomSchemas::V1::Types::SchemaInstance.from_json(json_object: item)
401
- end
402
302
  if parsed_json["vitals"].nil?
403
303
  vitals = nil
404
304
  else
405
305
  vitals = parsed_json["vitals"].to_json
406
306
  vitals = CandidApiClient::Encounters::V4::Types::VitalsUpdate.from_json(json_object: vitals)
407
307
  end
408
- existing_medications = parsed_json["existing_medications"]&.map do |item|
409
- item = item.to_json
410
- CandidApiClient::Encounters::V4::Types::Medication.from_json(json_object: item)
411
- end
412
- if parsed_json["guarantor"].nil?
413
- guarantor = nil
414
- else
415
- guarantor = parsed_json["guarantor"].to_json
416
- guarantor = CandidApiClient::Guarantor::V1::Types::GuarantorUpdate.from_json(json_object: guarantor)
417
- end
418
308
  referral_number = struct["referral_number"]
419
- if parsed_json["epsdt_referral"].nil?
420
- epsdt_referral = nil
421
- else
422
- epsdt_referral = parsed_json["epsdt_referral"].to_json
423
- epsdt_referral = CandidApiClient::Encounters::V4::Types::EpsdtReferral.from_json(json_object: epsdt_referral)
424
- end
425
- claim_supplemental_information = parsed_json["claim_supplemental_information"]&.map do |item|
426
- item = item.to_json
427
- CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation.from_json(json_object: item)
428
- end
429
309
  secondary_payer_carrier_code = struct["secondary_payer_carrier_code"]
430
310
  new(
431
311
  benefits_assigned_to_provider: benefits_assigned_to_provider,
@@ -433,7 +313,6 @@ module CandidApiClient
433
313
  external_id: external_id,
434
314
  date_of_service: date_of_service,
435
315
  tag_ids: tag_ids,
436
- clinical_notes: clinical_notes,
437
316
  billable_status: billable_status,
438
317
  responsible_party: responsible_party,
439
318
  provider_accepts_assignment: provider_accepts_assignment,
@@ -441,9 +320,6 @@ module CandidApiClient
441
320
  place_of_service_code: place_of_service_code,
442
321
  appointment_type: appointment_type,
443
322
  end_date_of_service: end_date_of_service,
444
- subscriber_primary: subscriber_primary,
445
- subscriber_secondary: subscriber_secondary,
446
- subscriber_tertiary: subscriber_tertiary,
447
323
  additional_information: additional_information,
448
324
  service_authorization_exception_code: service_authorization_exception_code,
449
325
  admission_date: admission_date,
@@ -452,13 +328,8 @@ module CandidApiClient
452
328
  last_menstrual_period_date: last_menstrual_period_date,
453
329
  delay_reason_code: delay_reason_code,
454
330
  patient_authorized_release: patient_authorized_release,
455
- schema_instances: schema_instances,
456
331
  vitals: vitals,
457
- existing_medications: existing_medications,
458
- guarantor: guarantor,
459
332
  referral_number: referral_number,
460
- epsdt_referral: epsdt_referral,
461
- claim_supplemental_information: claim_supplemental_information,
462
333
  secondary_payer_carrier_code: secondary_payer_carrier_code,
463
334
  additional_properties: struct
464
335
  )
@@ -483,7 +354,6 @@ module CandidApiClient
483
354
  obj.external_id&.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
484
355
  obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
485
356
  obj.tag_ids&.is_a?(Array) != false || raise("Passed value for field obj.tag_ids is not the expected type, validation failed.")
486
- obj.clinical_notes&.is_a?(Array) != false || raise("Passed value for field obj.clinical_notes is not the expected type, validation failed.")
487
357
  obj.billable_status&.is_a?(CandidApiClient::Encounters::V4::Types::BillableStatusType) != false || raise("Passed value for field obj.billable_status is not the expected type, validation failed.")
488
358
  obj.responsible_party&.is_a?(CandidApiClient::Encounters::V4::Types::ResponsiblePartyType) != false || raise("Passed value for field obj.responsible_party is not the expected type, validation failed.")
489
359
  obj.provider_accepts_assignment&.is_a?(Boolean) != false || raise("Passed value for field obj.provider_accepts_assignment is not the expected type, validation failed.")
@@ -491,9 +361,6 @@ module CandidApiClient
491
361
  obj.place_of_service_code&.is_a?(CandidApiClient::Commons::Types::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code is not the expected type, validation failed.")
492
362
  obj.appointment_type&.is_a?(String) != false || raise("Passed value for field obj.appointment_type is not the expected type, validation failed.")
493
363
  obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
494
- obj.subscriber_primary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_primary)
495
- obj.subscriber_secondary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_secondary)
496
- obj.subscriber_tertiary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_tertiary)
497
364
  obj.additional_information&.is_a?(String) != false || raise("Passed value for field obj.additional_information is not the expected type, validation failed.")
498
365
  obj.service_authorization_exception_code&.is_a?(CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode) != false || raise("Passed value for field obj.service_authorization_exception_code is not the expected type, validation failed.")
499
366
  obj.admission_date&.is_a?(Date) != false || raise("Passed value for field obj.admission_date is not the expected type, validation failed.")
@@ -502,13 +369,8 @@ module CandidApiClient
502
369
  obj.last_menstrual_period_date&.is_a?(Date) != false || raise("Passed value for field obj.last_menstrual_period_date is not the expected type, validation failed.")
503
370
  obj.delay_reason_code&.is_a?(CandidApiClient::Commons::Types::DelayReasonCode) != false || raise("Passed value for field obj.delay_reason_code is not the expected type, validation failed.")
504
371
  obj.patient_authorized_release&.is_a?(Boolean) != false || raise("Passed value for field obj.patient_authorized_release is not the expected type, validation failed.")
505
- obj.schema_instances&.is_a?(Array) != false || raise("Passed value for field obj.schema_instances is not the expected type, validation failed.")
506
372
  obj.vitals.nil? || CandidApiClient::Encounters::V4::Types::VitalsUpdate.validate_raw(obj: obj.vitals)
507
- obj.existing_medications&.is_a?(Array) != false || raise("Passed value for field obj.existing_medications is not the expected type, validation failed.")
508
- obj.guarantor.nil? || CandidApiClient::Guarantor::V1::Types::GuarantorUpdate.validate_raw(obj: obj.guarantor)
509
373
  obj.referral_number&.is_a?(String) != false || raise("Passed value for field obj.referral_number is not the expected type, validation failed.")
510
- obj.epsdt_referral.nil? || CandidApiClient::Encounters::V4::Types::EpsdtReferral.validate_raw(obj: obj.epsdt_referral)
511
- obj.claim_supplemental_information&.is_a?(Array) != false || raise("Passed value for field obj.claim_supplemental_information is not the expected type, validation failed.")
512
374
  obj.secondary_payer_carrier_code&.is_a?(String) != false || raise("Passed value for field obj.secondary_payer_carrier_code is not the expected type, validation failed.")
513
375
  end
514
376
  end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../commons/types/epsdt_referral_condition_indicator_code"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module Encounters
9
+ module V4
10
+ module Types
11
+ class EpsdtReferralOptional
12
+ # @return [CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode]
13
+ attr_reader :condition_indicator_1
14
+ # @return [CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode]
15
+ attr_reader :condition_indicator_2
16
+ # @return [CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode]
17
+ attr_reader :condition_indicator_3
18
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
19
+ attr_reader :additional_properties
20
+ # @return [Object]
21
+ attr_reader :_field_set
22
+ protected :_field_set
23
+
24
+ OMIT = Object.new
25
+
26
+ # @param condition_indicator_1 [CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode]
27
+ # @param condition_indicator_2 [CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode]
28
+ # @param condition_indicator_3 [CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode]
29
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
+ # @return [CandidApiClient::Encounters::V4::Types::EpsdtReferralOptional]
31
+ def initialize(condition_indicator_1: OMIT, condition_indicator_2: OMIT, condition_indicator_3: OMIT,
32
+ additional_properties: nil)
33
+ @condition_indicator_1 = condition_indicator_1 if condition_indicator_1 != OMIT
34
+ @condition_indicator_2 = condition_indicator_2 if condition_indicator_2 != OMIT
35
+ @condition_indicator_3 = condition_indicator_3 if condition_indicator_3 != OMIT
36
+ @additional_properties = additional_properties
37
+ @_field_set = {
38
+ "condition_indicator1": condition_indicator_1,
39
+ "condition_indicator2": condition_indicator_2,
40
+ "condition_indicator3": condition_indicator_3
41
+ }.reject do |_k, v|
42
+ v == OMIT
43
+ end
44
+ end
45
+
46
+ # Deserialize a JSON object to an instance of EpsdtReferralOptional
47
+ #
48
+ # @param json_object [String]
49
+ # @return [CandidApiClient::Encounters::V4::Types::EpsdtReferralOptional]
50
+ def self.from_json(json_object:)
51
+ struct = JSON.parse(json_object, object_class: OpenStruct)
52
+ condition_indicator_1 = struct["condition_indicator1"]
53
+ condition_indicator_2 = struct["condition_indicator2"]
54
+ condition_indicator_3 = struct["condition_indicator3"]
55
+ new(
56
+ condition_indicator_1: condition_indicator_1,
57
+ condition_indicator_2: condition_indicator_2,
58
+ condition_indicator_3: condition_indicator_3,
59
+ additional_properties: struct
60
+ )
61
+ end
62
+
63
+ # Serialize an instance of EpsdtReferralOptional to a JSON object
64
+ #
65
+ # @return [String]
66
+ def to_json(*_args)
67
+ @_field_set&.to_json
68
+ end
69
+
70
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
71
+ # hash and check each fields type against the current object's property
72
+ # definitions.
73
+ #
74
+ # @param obj [Object]
75
+ # @return [Void]
76
+ def self.validate_raw(obj:)
77
+ obj.condition_indicator_1&.is_a?(CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode) != false || raise("Passed value for field obj.condition_indicator_1 is not the expected type, validation failed.")
78
+ obj.condition_indicator_2&.is_a?(CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode) != false || raise("Passed value for field obj.condition_indicator_2 is not the expected type, validation failed.")
79
+ obj.condition_indicator_3&.is_a?(CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode) != false || raise("Passed value for field obj.condition_indicator_3 is not the expected type, validation failed.")
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "intake_response_and_follow_ups"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module Encounters
9
+ module V4
10
+ module Types
11
+ class IntakeQuestionOptional
12
+ # @return [String]
13
+ attr_reader :id
14
+ # @return [String]
15
+ attr_reader :text
16
+ # @return [Array<CandidApiClient::Encounters::V4::Types::IntakeResponseAndFollowUps>]
17
+ attr_reader :responses
18
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
19
+ attr_reader :additional_properties
20
+ # @return [Object]
21
+ attr_reader :_field_set
22
+ protected :_field_set
23
+
24
+ OMIT = Object.new
25
+
26
+ # @param id [String]
27
+ # @param text [String]
28
+ # @param responses [Array<CandidApiClient::Encounters::V4::Types::IntakeResponseAndFollowUps>]
29
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
+ # @return [CandidApiClient::Encounters::V4::Types::IntakeQuestionOptional]
31
+ def initialize(id: OMIT, text: OMIT, responses: OMIT, additional_properties: nil)
32
+ @id = id if id != OMIT
33
+ @text = text if text != OMIT
34
+ @responses = responses if responses != OMIT
35
+ @additional_properties = additional_properties
36
+ @_field_set = { "id": id, "text": text, "responses": responses }.reject do |_k, v|
37
+ v == OMIT
38
+ end
39
+ end
40
+
41
+ # Deserialize a JSON object to an instance of IntakeQuestionOptional
42
+ #
43
+ # @param json_object [String]
44
+ # @return [CandidApiClient::Encounters::V4::Types::IntakeQuestionOptional]
45
+ def self.from_json(json_object:)
46
+ struct = JSON.parse(json_object, object_class: OpenStruct)
47
+ parsed_json = JSON.parse(json_object)
48
+ id = struct["id"]
49
+ text = struct["text"]
50
+ responses = parsed_json["responses"]&.map do |item|
51
+ item = item.to_json
52
+ CandidApiClient::Encounters::V4::Types::IntakeResponseAndFollowUps.from_json(json_object: item)
53
+ end
54
+ new(
55
+ id: id,
56
+ text: text,
57
+ responses: responses,
58
+ additional_properties: struct
59
+ )
60
+ end
61
+
62
+ # Serialize an instance of IntakeQuestionOptional to a JSON object
63
+ #
64
+ # @return [String]
65
+ def to_json(*_args)
66
+ @_field_set&.to_json
67
+ end
68
+
69
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
70
+ # hash and check each fields type against the current object's property
71
+ # definitions.
72
+ #
73
+ # @param obj [Object]
74
+ # @return [Void]
75
+ def self.validate_raw(obj:)
76
+ obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
77
+ obj.text&.is_a?(String) != false || raise("Passed value for field obj.text is not the expected type, validation failed.")
78
+ obj.responses&.is_a?(Array) != false || raise("Passed value for field obj.responses is not the expected type, validation failed.")
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,114 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "intervention_category"
4
+ require_relative "medication_optional"
5
+ require_relative "lab_optional"
6
+ require "ostruct"
7
+ require "json"
8
+
9
+ module CandidApiClient
10
+ module Encounters
11
+ module V4
12
+ module Types
13
+ class InterventionOptional
14
+ # @return [String]
15
+ attr_reader :name
16
+ # @return [CandidApiClient::Encounters::V4::Types::InterventionCategory]
17
+ attr_reader :category
18
+ # @return [String] "Examples: 'Birth Control LAC', 'Tracking', 'Stress Management', 'Supplement',
19
+ # 'Labs'"
20
+ attr_reader :description
21
+ # @return [CandidApiClient::Encounters::V4::Types::MedicationOptional] Required when `type` is `allopathic`.
22
+ attr_reader :medication
23
+ # @return [Array<CandidApiClient::Encounters::V4::Types::LabOptional>] Required when `type` is `tests`.
24
+ attr_reader :labs
25
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
26
+ attr_reader :additional_properties
27
+ # @return [Object]
28
+ attr_reader :_field_set
29
+ protected :_field_set
30
+
31
+ OMIT = Object.new
32
+
33
+ # @param name [String]
34
+ # @param category [CandidApiClient::Encounters::V4::Types::InterventionCategory]
35
+ # @param description [String] "Examples: 'Birth Control LAC', 'Tracking', 'Stress Management', 'Supplement',
36
+ # 'Labs'"
37
+ # @param medication [CandidApiClient::Encounters::V4::Types::MedicationOptional] Required when `type` is `allopathic`.
38
+ # @param labs [Array<CandidApiClient::Encounters::V4::Types::LabOptional>] Required when `type` is `tests`.
39
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
40
+ # @return [CandidApiClient::Encounters::V4::Types::InterventionOptional]
41
+ def initialize(name: OMIT, category: OMIT, description: OMIT, medication: OMIT, labs: OMIT,
42
+ additional_properties: nil)
43
+ @name = name if name != OMIT
44
+ @category = category if category != OMIT
45
+ @description = description if description != OMIT
46
+ @medication = medication if medication != OMIT
47
+ @labs = labs if labs != OMIT
48
+ @additional_properties = additional_properties
49
+ @_field_set = {
50
+ "name": name,
51
+ "category": category,
52
+ "description": description,
53
+ "medication": medication,
54
+ "labs": labs
55
+ }.reject do |_k, v|
56
+ v == OMIT
57
+ end
58
+ end
59
+
60
+ # Deserialize a JSON object to an instance of InterventionOptional
61
+ #
62
+ # @param json_object [String]
63
+ # @return [CandidApiClient::Encounters::V4::Types::InterventionOptional]
64
+ def self.from_json(json_object:)
65
+ struct = JSON.parse(json_object, object_class: OpenStruct)
66
+ parsed_json = JSON.parse(json_object)
67
+ name = struct["name"]
68
+ category = struct["category"]
69
+ description = struct["description"]
70
+ if parsed_json["medication"].nil?
71
+ medication = nil
72
+ else
73
+ medication = parsed_json["medication"].to_json
74
+ medication = CandidApiClient::Encounters::V4::Types::MedicationOptional.from_json(json_object: medication)
75
+ end
76
+ labs = parsed_json["labs"]&.map do |item|
77
+ item = item.to_json
78
+ CandidApiClient::Encounters::V4::Types::LabOptional.from_json(json_object: item)
79
+ end
80
+ new(
81
+ name: name,
82
+ category: category,
83
+ description: description,
84
+ medication: medication,
85
+ labs: labs,
86
+ additional_properties: struct
87
+ )
88
+ end
89
+
90
+ # Serialize an instance of InterventionOptional to a JSON object
91
+ #
92
+ # @return [String]
93
+ def to_json(*_args)
94
+ @_field_set&.to_json
95
+ end
96
+
97
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
98
+ # hash and check each fields type against the current object's property
99
+ # definitions.
100
+ #
101
+ # @param obj [Object]
102
+ # @return [Void]
103
+ def self.validate_raw(obj:)
104
+ obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
105
+ obj.category&.is_a?(CandidApiClient::Encounters::V4::Types::InterventionCategory) != false || raise("Passed value for field obj.category is not the expected type, validation failed.")
106
+ obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
107
+ obj.medication.nil? || CandidApiClient::Encounters::V4::Types::MedicationOptional.validate_raw(obj: obj.medication)
108
+ obj.labs&.is_a?(Array) != false || raise("Passed value for field obj.labs is not the expected type, validation failed.")
109
+ end
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end