candidhealth 1.5.0 → 1.7.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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +46 -0
  3. data/lib/candidhealth/credentialing/v_2/client.rb +342 -8
  4. data/lib/candidhealth/credentialing/v_2/types/base_credentialing_span.rb +143 -0
  5. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span.rb +165 -0
  6. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span_page.rb +88 -0
  7. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +34 -34
  8. data/lib/candidhealth/health_care_code_information/client.rb +30 -0
  9. data/lib/candidhealth/health_care_code_information/v_1/client.rb +268 -0
  10. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +236 -0
  11. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_code_qualifier.rb +14 -0
  12. data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +1068 -0
  13. data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +71 -0
  14. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +237 -0
  15. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_code_qualifier.rb +13 -0
  16. data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +54 -0
  17. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +236 -0
  18. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_code_qualifier.rb +13 -0
  19. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +245 -0
  20. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_code_qualifier.rb +14 -0
  21. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +218 -0
  22. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +227 -0
  23. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +188 -0
  24. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +225 -0
  25. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +71 -0
  26. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +249 -0
  27. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_code_qualifier.rb +13 -0
  28. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +25 -0
  29. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code_qualifier.rb +13 -0
  30. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +252 -0
  31. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +245 -0
  32. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_code_qualifier.rb +14 -0
  33. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +248 -0
  34. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_code_qualifier.rb +14 -0
  35. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +236 -0
  36. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_code_qualifier.rb +14 -0
  37. data/lib/candidhealth/health_care_code_information/v_1/types/present_on_admission_indicator_code.rb +17 -0
  38. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +245 -0
  39. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_code_qualifier.rb +14 -0
  40. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +246 -0
  41. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_code_qualifier.rb +15 -0
  42. data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +72 -0
  43. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_admitting_diagnosis.rb +69 -0
  44. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_diagnosis_related_group.rb +69 -0
  45. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_diagnosis.rb +69 -0
  46. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_procedure_information.rb +71 -0
  47. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +236 -0
  48. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_qualifier.rb +13 -0
  49. data/lib/candidhealth/health_care_code_information/v_1/types/value_code.rb +119 -0
  50. data/lib/candidhealth/health_care_code_information/v_1/types/value_code_qualifier.rb +13 -0
  51. data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +245 -0
  52. data/lib/candidhealth/patient_ar/client.rb +30 -0
  53. data/lib/candidhealth/patient_ar/v_1/client.rb +161 -0
  54. data/lib/candidhealth/patient_ar/v_1/types/insurance_adjustment_info.rb +60 -0
  55. data/lib/candidhealth/patient_ar/v_1/types/insurance_payment_info.rb +60 -0
  56. data/lib/candidhealth/patient_ar/v_1/types/invalid_filters_error_type.rb +60 -0
  57. data/lib/candidhealth/patient_ar/v_1/types/inventory_record.rb +101 -0
  58. data/lib/candidhealth/patient_ar/v_1/types/invoice_itemization_response.rb +103 -0
  59. data/lib/candidhealth/patient_ar/v_1/types/list_inventory_paged_response.rb +77 -0
  60. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_adjustment_info.rb +60 -0
  61. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_payment_info.rb +60 -0
  62. data/lib/candidhealth/patient_ar/v_1/types/patient_adjustment_info.rb +60 -0
  63. data/lib/candidhealth/patient_ar/v_1/types/patient_ar_status.rb +14 -0
  64. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_allocation.rb +76 -0
  65. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_info.rb +75 -0
  66. data/lib/candidhealth/patient_ar/v_1/types/service_line_itemization.rb +210 -0
  67. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +132 -0
  68. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +16 -2
  69. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +16 -2
  70. data/lib/candidhealth/pre_encounter/patients/v_1/types/origination_detail.rb +104 -0
  71. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +16 -2
  72. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_source.rb +18 -0
  73. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +16 -0
  74. data/lib/candidhealth/pre_encounter/patients/v_1/types/specialization_category.rb +42 -0
  75. data/lib/candidhealth.rb +21 -7
  76. data/lib/requests.rb +2 -2
  77. data/lib/types_export.rb +72 -9
  78. metadata +68 -2
@@ -117,6 +117,28 @@ module CandidApiClient
117
117
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
118
118
  # * :note_ids (Array<String>)
119
119
  # * :tag_ids (Array<String>)
120
+ # * :origination_detail (Hash)
121
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
122
+ # * :referring_provider (Hash)
123
+ # * :name (Hash)
124
+ # * :family (String)
125
+ # * :given (Array<String>)
126
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
127
+ # * :period (Hash)
128
+ # * :start (Date)
129
+ # * :end_ (Date)
130
+ # * :suffix (String)
131
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
132
+ # * :npi (String)
133
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
134
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
135
+ # * :period (Hash)
136
+ # * :start (Date)
137
+ # * :end_ (Date)
138
+ # * :canonical_id (String)
139
+ # * :fax (String)
140
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
141
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
120
142
  # @param request_options [CandidApiClient::RequestOptions]
121
143
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
122
144
  # @example
@@ -237,6 +259,28 @@ module CandidApiClient
237
259
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
238
260
  # * :note_ids (Array<String>)
239
261
  # * :tag_ids (Array<String>)
262
+ # * :origination_detail (Hash)
263
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
264
+ # * :referring_provider (Hash)
265
+ # * :name (Hash)
266
+ # * :family (String)
267
+ # * :given (Array<String>)
268
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
269
+ # * :period (Hash)
270
+ # * :start (Date)
271
+ # * :end_ (Date)
272
+ # * :suffix (String)
273
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
274
+ # * :npi (String)
275
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
276
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
277
+ # * :period (Hash)
278
+ # * :start (Date)
279
+ # * :end_ (Date)
280
+ # * :canonical_id (String)
281
+ # * :fax (String)
282
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
283
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
240
284
  # @param request_options [CandidApiClient::RequestOptions]
241
285
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
242
286
  # @example
@@ -478,6 +522,28 @@ module CandidApiClient
478
522
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
479
523
  # * :note_ids (Array<String>)
480
524
  # * :tag_ids (Array<String>)
525
+ # * :origination_detail (Hash)
526
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
527
+ # * :referring_provider (Hash)
528
+ # * :name (Hash)
529
+ # * :family (String)
530
+ # * :given (Array<String>)
531
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
532
+ # * :period (Hash)
533
+ # * :start (Date)
534
+ # * :end_ (Date)
535
+ # * :suffix (String)
536
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
537
+ # * :npi (String)
538
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
539
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
540
+ # * :period (Hash)
541
+ # * :start (Date)
542
+ # * :end_ (Date)
543
+ # * :canonical_id (String)
544
+ # * :fax (String)
545
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
546
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
481
547
  # @param request_options [CandidApiClient::RequestOptions]
482
548
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
483
549
  # @example
@@ -718,6 +784,28 @@ module CandidApiClient
718
784
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
719
785
  # * :note_ids (Array<String>)
720
786
  # * :tag_ids (Array<String>)
787
+ # * :origination_detail (Hash)
788
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
789
+ # * :referring_provider (Hash)
790
+ # * :name (Hash)
791
+ # * :family (String)
792
+ # * :given (Array<String>)
793
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
794
+ # * :period (Hash)
795
+ # * :start (Date)
796
+ # * :end_ (Date)
797
+ # * :suffix (String)
798
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
799
+ # * :npi (String)
800
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
801
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
802
+ # * :period (Hash)
803
+ # * :start (Date)
804
+ # * :end_ (Date)
805
+ # * :canonical_id (String)
806
+ # * :fax (String)
807
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
808
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
721
809
  # @param request_options [CandidApiClient::RequestOptions]
722
810
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
723
811
  # @example
@@ -840,6 +928,28 @@ module CandidApiClient
840
928
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
841
929
  # * :note_ids (Array<String>)
842
930
  # * :tag_ids (Array<String>)
931
+ # * :origination_detail (Hash)
932
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
933
+ # * :referring_provider (Hash)
934
+ # * :name (Hash)
935
+ # * :family (String)
936
+ # * :given (Array<String>)
937
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
938
+ # * :period (Hash)
939
+ # * :start (Date)
940
+ # * :end_ (Date)
941
+ # * :suffix (String)
942
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
943
+ # * :npi (String)
944
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
945
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
946
+ # * :period (Hash)
947
+ # * :start (Date)
948
+ # * :end_ (Date)
949
+ # * :canonical_id (String)
950
+ # * :fax (String)
951
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
952
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
843
953
  # @param request_options [CandidApiClient::RequestOptions]
844
954
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
845
955
  # @example
@@ -1091,6 +1201,28 @@ module CandidApiClient
1091
1201
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
1092
1202
  # * :note_ids (Array<String>)
1093
1203
  # * :tag_ids (Array<String>)
1204
+ # * :origination_detail (Hash)
1205
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
1206
+ # * :referring_provider (Hash)
1207
+ # * :name (Hash)
1208
+ # * :family (String)
1209
+ # * :given (Array<String>)
1210
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
1211
+ # * :period (Hash)
1212
+ # * :start (Date)
1213
+ # * :end_ (Date)
1214
+ # * :suffix (String)
1215
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
1216
+ # * :npi (String)
1217
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
1218
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
1219
+ # * :period (Hash)
1220
+ # * :start (Date)
1221
+ # * :end_ (Date)
1222
+ # * :canonical_id (String)
1223
+ # * :fax (String)
1224
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
1225
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
1094
1226
  # @param request_options [CandidApiClient::RequestOptions]
1095
1227
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
1096
1228
  # @example
@@ -21,6 +21,7 @@ require_relative "guarantor"
21
21
  require_relative "authorization"
22
22
  require_relative "referral"
23
23
  require_relative "do_not_invoice_reason"
24
+ require_relative "origination_detail"
24
25
  require "ostruct"
25
26
  require "json"
26
27
 
@@ -109,6 +110,8 @@ module CandidApiClient
109
110
  attr_reader :note_ids
110
111
  # @return [Array<String>]
111
112
  attr_reader :tag_ids
113
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail] Information about the patient source, if applicable.
114
+ attr_reader :origination_detail
112
115
  # @return [OpenStruct] Additional properties unmapped to the current class definition
113
116
  attr_reader :additional_properties
114
117
  # @return [Object]
@@ -158,10 +161,11 @@ module CandidApiClient
158
161
  # @param do_not_invoice_reason [CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason] If this value is defined, the customer will not be invoiced.
159
162
  # @param note_ids [Array<String>]
160
163
  # @param tag_ids [Array<String>]
164
+ # @param origination_detail [CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail] Information about the patient source, if applicable.
161
165
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
162
166
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient]
163
167
  def initialize(name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, other_identifiers: OMIT, gender: OMIT,
164
- social_security_number: OMIT, sexual_orientation: OMIT, pronouns: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, note_ids: OMIT, tag_ids: OMIT, additional_properties: nil)
168
+ social_security_number: OMIT, sexual_orientation: OMIT, pronouns: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, note_ids: OMIT, tag_ids: OMIT, origination_detail: OMIT, additional_properties: nil)
165
169
  @name = name
166
170
  @other_names = other_names
167
171
  @other_identifiers = other_identifiers if other_identifiers != OMIT
@@ -203,6 +207,7 @@ module CandidApiClient
203
207
  @do_not_invoice_reason = do_not_invoice_reason if do_not_invoice_reason != OMIT
204
208
  @note_ids = note_ids if note_ids != OMIT
205
209
  @tag_ids = tag_ids if tag_ids != OMIT
210
+ @origination_detail = origination_detail if origination_detail != OMIT
206
211
  @additional_properties = additional_properties
207
212
  @_field_set = {
208
213
  "name": name,
@@ -241,7 +246,8 @@ module CandidApiClient
241
246
  "primary_service_facility_id": primary_service_facility_id,
242
247
  "do_not_invoice_reason": do_not_invoice_reason,
243
248
  "note_ids": note_ids,
244
- "tag_ids": tag_ids
249
+ "tag_ids": tag_ids,
250
+ "origination_detail": origination_detail
245
251
  }.reject do |_k, v|
246
252
  v == OMIT
247
253
  end
@@ -348,6 +354,12 @@ module CandidApiClient
348
354
  do_not_invoice_reason = struct["do_not_invoice_reason"]
349
355
  note_ids = struct["note_ids"]
350
356
  tag_ids = struct["tag_ids"]
357
+ if parsed_json["origination_detail"].nil?
358
+ origination_detail = nil
359
+ else
360
+ origination_detail = parsed_json["origination_detail"].to_json
361
+ origination_detail = CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail.from_json(json_object: origination_detail)
362
+ end
351
363
  new(
352
364
  name: name,
353
365
  other_names: other_names,
@@ -386,6 +398,7 @@ module CandidApiClient
386
398
  do_not_invoice_reason: do_not_invoice_reason,
387
399
  note_ids: note_ids,
388
400
  tag_ids: tag_ids,
401
+ origination_detail: origination_detail,
389
402
  additional_properties: struct
390
403
  )
391
404
  end
@@ -441,6 +454,7 @@ module CandidApiClient
441
454
  obj.do_not_invoice_reason&.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason) != false || raise("Passed value for field obj.do_not_invoice_reason is not the expected type, validation failed.")
442
455
  obj.note_ids&.is_a?(Array) != false || raise("Passed value for field obj.note_ids is not the expected type, validation failed.")
443
456
  obj.tag_ids&.is_a?(Array) != false || raise("Passed value for field obj.tag_ids is not the expected type, validation failed.")
457
+ obj.origination_detail.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail.validate_raw(obj: obj.origination_detail)
444
458
  end
445
459
  end
446
460
  end
@@ -21,6 +21,7 @@ require_relative "guarantor"
21
21
  require_relative "authorization"
22
22
  require_relative "referral"
23
23
  require_relative "do_not_invoice_reason"
24
+ require_relative "origination_detail"
24
25
  require "ostruct"
25
26
  require "json"
26
27
 
@@ -110,6 +111,8 @@ module CandidApiClient
110
111
  attr_reader :note_ids
111
112
  # @return [Array<String>]
112
113
  attr_reader :tag_ids
114
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail] Information about the patient source, if applicable.
115
+ attr_reader :origination_detail
113
116
  # @return [OpenStruct] Additional properties unmapped to the current class definition
114
117
  attr_reader :additional_properties
115
118
  # @return [Object]
@@ -160,10 +163,11 @@ module CandidApiClient
160
163
  # @param do_not_invoice_reason [CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason] If this value is defined, the customer will not be invoiced.
161
164
  # @param note_ids [Array<String>]
162
165
  # @param tag_ids [Array<String>]
166
+ # @param origination_detail [CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail] Information about the patient source, if applicable.
163
167
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
164
168
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn]
165
169
  def initialize(mrn:, name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, other_identifiers: OMIT, gender: OMIT,
166
- social_security_number: OMIT, sexual_orientation: OMIT, pronouns: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, note_ids: OMIT, tag_ids: OMIT, additional_properties: nil)
170
+ social_security_number: OMIT, sexual_orientation: OMIT, pronouns: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, note_ids: OMIT, tag_ids: OMIT, origination_detail: OMIT, additional_properties: nil)
167
171
  @mrn = mrn
168
172
  @name = name
169
173
  @other_names = other_names
@@ -206,6 +210,7 @@ module CandidApiClient
206
210
  @do_not_invoice_reason = do_not_invoice_reason if do_not_invoice_reason != OMIT
207
211
  @note_ids = note_ids if note_ids != OMIT
208
212
  @tag_ids = tag_ids if tag_ids != OMIT
213
+ @origination_detail = origination_detail if origination_detail != OMIT
209
214
  @additional_properties = additional_properties
210
215
  @_field_set = {
211
216
  "mrn": mrn,
@@ -245,7 +250,8 @@ module CandidApiClient
245
250
  "primary_service_facility_id": primary_service_facility_id,
246
251
  "do_not_invoice_reason": do_not_invoice_reason,
247
252
  "note_ids": note_ids,
248
- "tag_ids": tag_ids
253
+ "tag_ids": tag_ids,
254
+ "origination_detail": origination_detail
249
255
  }.reject do |_k, v|
250
256
  v == OMIT
251
257
  end
@@ -353,6 +359,12 @@ module CandidApiClient
353
359
  do_not_invoice_reason = struct["do_not_invoice_reason"]
354
360
  note_ids = struct["note_ids"]
355
361
  tag_ids = struct["tag_ids"]
362
+ if parsed_json["origination_detail"].nil?
363
+ origination_detail = nil
364
+ else
365
+ origination_detail = parsed_json["origination_detail"].to_json
366
+ origination_detail = CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail.from_json(json_object: origination_detail)
367
+ end
356
368
  new(
357
369
  mrn: mrn,
358
370
  name: name,
@@ -392,6 +404,7 @@ module CandidApiClient
392
404
  do_not_invoice_reason: do_not_invoice_reason,
393
405
  note_ids: note_ids,
394
406
  tag_ids: tag_ids,
407
+ origination_detail: origination_detail,
395
408
  additional_properties: struct
396
409
  )
397
410
  end
@@ -448,6 +461,7 @@ module CandidApiClient
448
461
  obj.do_not_invoice_reason&.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason) != false || raise("Passed value for field obj.do_not_invoice_reason is not the expected type, validation failed.")
449
462
  obj.note_ids&.is_a?(Array) != false || raise("Passed value for field obj.note_ids is not the expected type, validation failed.")
450
463
  obj.tag_ids&.is_a?(Array) != false || raise("Passed value for field obj.tag_ids is not the expected type, validation failed.")
464
+ obj.origination_detail.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail.validate_raw(obj: obj.origination_detail)
451
465
  end
452
466
  end
453
467
  end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "referral_source"
4
+ require_relative "../../../common/types/external_provider"
5
+ require_relative "specialization_category"
6
+ require_relative "referral_type"
7
+ require "ostruct"
8
+ require "json"
9
+
10
+ module CandidApiClient
11
+ module PreEncounter
12
+ module Patients
13
+ module V1
14
+ module Types
15
+ class OriginationDetail
16
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource]
17
+ attr_reader :referral_source
18
+ # @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
19
+ attr_reader :referring_provider
20
+ # @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>]
21
+ attr_reader :specialization_categories
22
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType]
23
+ attr_reader :referral_type
24
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
25
+ attr_reader :additional_properties
26
+ # @return [Object]
27
+ attr_reader :_field_set
28
+ protected :_field_set
29
+
30
+ OMIT = Object.new
31
+
32
+ # @param referral_source [CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource]
33
+ # @param referring_provider [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
34
+ # @param specialization_categories [Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>]
35
+ # @param referral_type [CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType]
36
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
37
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail]
38
+ def initialize(referral_source:, referring_provider: OMIT, specialization_categories: OMIT,
39
+ referral_type: OMIT, additional_properties: nil)
40
+ @referral_source = referral_source
41
+ @referring_provider = referring_provider if referring_provider != OMIT
42
+ @specialization_categories = specialization_categories if specialization_categories != OMIT
43
+ @referral_type = referral_type if referral_type != OMIT
44
+ @additional_properties = additional_properties
45
+ @_field_set = {
46
+ "referral_source": referral_source,
47
+ "referring_provider": referring_provider,
48
+ "specialization_categories": specialization_categories,
49
+ "referral_type": referral_type
50
+ }.reject do |_k, v|
51
+ v == OMIT
52
+ end
53
+ end
54
+
55
+ # Deserialize a JSON object to an instance of OriginationDetail
56
+ #
57
+ # @param json_object [String]
58
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail]
59
+ def self.from_json(json_object:)
60
+ struct = JSON.parse(json_object, object_class: OpenStruct)
61
+ parsed_json = JSON.parse(json_object)
62
+ referral_source = struct["referral_source"]
63
+ if parsed_json["referring_provider"].nil?
64
+ referring_provider = nil
65
+ else
66
+ referring_provider = parsed_json["referring_provider"].to_json
67
+ referring_provider = CandidApiClient::PreEncounter::Common::Types::ExternalProvider.from_json(json_object: referring_provider)
68
+ end
69
+ specialization_categories = struct["specialization_categories"]
70
+ referral_type = struct["referral_type"]
71
+ new(
72
+ referral_source: referral_source,
73
+ referring_provider: referring_provider,
74
+ specialization_categories: specialization_categories,
75
+ referral_type: referral_type,
76
+ additional_properties: struct
77
+ )
78
+ end
79
+
80
+ # Serialize an instance of OriginationDetail to a JSON object
81
+ #
82
+ # @return [String]
83
+ def to_json(*_args)
84
+ @_field_set&.to_json
85
+ end
86
+
87
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
88
+ # hash and check each fields type against the current object's property
89
+ # definitions.
90
+ #
91
+ # @param obj [Object]
92
+ # @return [Void]
93
+ def self.validate_raw(obj:)
94
+ obj.referral_source.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource) != false || raise("Passed value for field obj.referral_source is not the expected type, validation failed.")
95
+ obj.referring_provider.nil? || CandidApiClient::PreEncounter::Common::Types::ExternalProvider.validate_raw(obj: obj.referring_provider)
96
+ obj.specialization_categories&.is_a?(Array) != false || raise("Passed value for field obj.specialization_categories is not the expected type, validation failed.")
97
+ obj.referral_type&.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType) != false || raise("Passed value for field obj.referral_type is not the expected type, validation failed.")
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -21,6 +21,7 @@ require_relative "guarantor"
21
21
  require_relative "authorization"
22
22
  require_relative "referral"
23
23
  require_relative "do_not_invoice_reason"
24
+ require_relative "origination_detail"
24
25
  require "ostruct"
25
26
  require "json"
26
27
 
@@ -128,6 +129,8 @@ module CandidApiClient
128
129
  attr_reader :note_ids
129
130
  # @return [Array<String>]
130
131
  attr_reader :tag_ids
132
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail] Information about the patient source, if applicable.
133
+ attr_reader :origination_detail
131
134
  # @return [OpenStruct] Additional properties unmapped to the current class definition
132
135
  attr_reader :additional_properties
133
136
  # @return [Object]
@@ -189,10 +192,11 @@ module CandidApiClient
189
192
  # @param do_not_invoice_reason [CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason] If this value is defined, the customer will not be invoiced.
190
193
  # @param note_ids [Array<String>]
191
194
  # @param tag_ids [Array<String>]
195
+ # @param origination_detail [CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail] Information about the patient source, if applicable.
192
196
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
193
197
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
194
198
  def initialize(id:, mrn:, organization_id:, deactivated:, version:, updated_at:, updating_user_id:, name:,
195
- other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, other_identifiers: OMIT, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, pronouns: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, note_ids: OMIT, tag_ids: OMIT, additional_properties: nil)
199
+ other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, other_identifiers: OMIT, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, pronouns: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, note_ids: OMIT, tag_ids: OMIT, origination_detail: OMIT, additional_properties: nil)
196
200
  @id = id
197
201
  @mrn = mrn
198
202
  @organization_id = organization_id
@@ -241,6 +245,7 @@ module CandidApiClient
241
245
  @do_not_invoice_reason = do_not_invoice_reason if do_not_invoice_reason != OMIT
242
246
  @note_ids = note_ids if note_ids != OMIT
243
247
  @tag_ids = tag_ids if tag_ids != OMIT
248
+ @origination_detail = origination_detail if origination_detail != OMIT
244
249
  @additional_properties = additional_properties
245
250
  @_field_set = {
246
251
  "id": id,
@@ -286,7 +291,8 @@ module CandidApiClient
286
291
  "primary_service_facility_id": primary_service_facility_id,
287
292
  "do_not_invoice_reason": do_not_invoice_reason,
288
293
  "note_ids": note_ids,
289
- "tag_ids": tag_ids
294
+ "tag_ids": tag_ids,
295
+ "origination_detail": origination_detail
290
296
  }.reject do |_k, v|
291
297
  v == OMIT
292
298
  end
@@ -400,6 +406,12 @@ module CandidApiClient
400
406
  do_not_invoice_reason = struct["do_not_invoice_reason"]
401
407
  note_ids = struct["note_ids"]
402
408
  tag_ids = struct["tag_ids"]
409
+ if parsed_json["origination_detail"].nil?
410
+ origination_detail = nil
411
+ else
412
+ origination_detail = parsed_json["origination_detail"].to_json
413
+ origination_detail = CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail.from_json(json_object: origination_detail)
414
+ end
403
415
  new(
404
416
  id: id,
405
417
  mrn: mrn,
@@ -445,6 +457,7 @@ module CandidApiClient
445
457
  do_not_invoice_reason: do_not_invoice_reason,
446
458
  note_ids: note_ids,
447
459
  tag_ids: tag_ids,
460
+ origination_detail: origination_detail,
448
461
  additional_properties: struct
449
462
  )
450
463
  end
@@ -507,6 +520,7 @@ module CandidApiClient
507
520
  obj.do_not_invoice_reason&.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason) != false || raise("Passed value for field obj.do_not_invoice_reason is not the expected type, validation failed.")
508
521
  obj.note_ids&.is_a?(Array) != false || raise("Passed value for field obj.note_ids is not the expected type, validation failed.")
509
522
  obj.tag_ids&.is_a?(Array) != false || raise("Passed value for field obj.tag_ids is not the expected type, validation failed.")
523
+ obj.origination_detail.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail.validate_raw(obj: obj.origination_detail)
510
524
  end
511
525
  end
512
526
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module PreEncounter
5
+ module Patients
6
+ module V1
7
+ module Types
8
+ class ReferralSource
9
+ HOSPITAL = "HOSPITAL"
10
+ REFERRING_MD = "REFERRING_MD"
11
+ SELF = "SELF"
12
+ OTHER = "OTHER"
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module PreEncounter
5
+ module Patients
6
+ module V1
7
+ module Types
8
+ class ReferralType
9
+ DIRECTED = "DIRECTED"
10
+ ROTATION = "ROTATION"
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module PreEncounter
5
+ module Patients
6
+ module V1
7
+ module Types
8
+ class SpecializationCategory
9
+ BEHAVIORAL_HEALTH_THERAPY = "BEHAVIORAL_HEALTH_THERAPY"
10
+ CARDIOLOGY = "CARDIOLOGY"
11
+ DERMATOLOGY = "DERMATOLOGY"
12
+ ENDOCRINOLOGY = "ENDOCRINOLOGY"
13
+ ENT = "ENT"
14
+ GASTROENTEROLOGY = "GASTROENTEROLOGY"
15
+ GENERAL_SURGERY = "GENERAL_SURGERY"
16
+ GENETICS = "GENETICS"
17
+ HEMATOLOGY = "HEMATOLOGY"
18
+ INFECTIOUS_DISEASE = "INFECTIOUS_DISEASE"
19
+ NEUROLOGY = "NEUROLOGY"
20
+ NUTRITIONAL_THERAPY = "NUTRITIONAL_THERAPY"
21
+ OB_GYN = "OB_GYN"
22
+ ONCOLOGY = "ONCOLOGY"
23
+ OPHTHALMOLOGY = "OPHTHALMOLOGY"
24
+ ORTHOPEDICS = "ORTHOPEDICS"
25
+ PAIN_MANAGEMENT = "PAIN_MANAGEMENT"
26
+ PEDIATRICS = "PEDIATRICS"
27
+ PHYSICAL_THERAPY = "PHYSICAL_THERAPY"
28
+ PODIATRY = "PODIATRY"
29
+ PRIMARY_CARE = "PRIMARY_CARE"
30
+ PSYCHIATRY = "PSYCHIATRY"
31
+ PULMONOLOGY = "PULMONOLOGY"
32
+ RADIOLOGY = "RADIOLOGY"
33
+ RHEUMATOLOGY = "RHEUMATOLOGY"
34
+ SCREENING = "SCREENING"
35
+ UROLOGY = "UROLOGY"
36
+ OTHER = "OTHER"
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end