candidhealth 1.6.0 → 1.8.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 (151) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +74 -0
  3. data/lib/candidhealth/charge_capture/v_1/client.rb +48 -48
  4. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +70 -56
  5. data/lib/candidhealth/commons/types/clearinghouse.rb +18 -0
  6. data/lib/candidhealth/commons/types/procedure_modifier.rb +11 -0
  7. data/lib/candidhealth/credentialing/v_2/client.rb +342 -8
  8. data/lib/candidhealth/credentialing/v_2/types/base_credentialing_span.rb +143 -0
  9. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span.rb +165 -0
  10. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span_page.rb +88 -0
  11. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +34 -34
  12. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb +1 -1
  13. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +1 -1
  14. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +1 -1
  15. data/lib/candidhealth/encounters/v_4/client.rb +3253 -2040
  16. data/lib/candidhealth/encounters/v_4/types/encounter.rb +111 -86
  17. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +39 -33
  18. data/lib/candidhealth/encounters/v_4/types/encounter_create.rb +796 -0
  19. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +131 -117
  20. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +70 -56
  21. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +29 -39
  22. data/lib/candidhealth/encounters/v_4/types/encounter_rendering_or_attending_provider_required_error.rb +55 -0
  23. data/lib/candidhealth/encounters/v_4/types/encounter_update.rb +736 -0
  24. data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +944 -0
  25. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_base.rb +691 -0
  26. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +791 -0
  27. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb +572 -0
  28. data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +872 -0
  29. data/lib/candidhealth/encounters_universal/types/universal_encounter_update_base.rb +700 -0
  30. data/lib/candidhealth/fee_schedules/v_3/client.rb +57 -0
  31. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +12 -0
  32. data/lib/candidhealth/financials/types/patient_transaction_source.rb +1 -0
  33. data/lib/candidhealth/health_care_code_information/client.rb +30 -0
  34. data/lib/candidhealth/health_care_code_information/v_1/client.rb +268 -0
  35. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +236 -0
  36. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_code_qualifier.rb +14 -0
  37. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +206 -0
  38. data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +1068 -0
  39. data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +71 -0
  40. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +237 -0
  41. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_code_qualifier.rb +13 -0
  42. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +207 -0
  43. data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +54 -0
  44. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +236 -0
  45. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_code_qualifier.rb +13 -0
  46. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +206 -0
  47. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +245 -0
  48. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_code_qualifier.rb +14 -0
  49. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +245 -0
  50. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +218 -0
  51. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +225 -0
  52. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +227 -0
  53. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +188 -0
  54. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +225 -0
  55. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +71 -0
  56. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +249 -0
  57. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_code_qualifier.rb +13 -0
  58. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +219 -0
  59. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +25 -0
  60. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code_qualifier.rb +13 -0
  61. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +252 -0
  62. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +222 -0
  63. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +245 -0
  64. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_code_qualifier.rb +14 -0
  65. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +215 -0
  66. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +248 -0
  67. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_code_qualifier.rb +14 -0
  68. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +218 -0
  69. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +236 -0
  70. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_code_qualifier.rb +14 -0
  71. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +206 -0
  72. data/lib/candidhealth/health_care_code_information/v_1/types/present_on_admission_indicator_code.rb +17 -0
  73. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +245 -0
  74. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_code_qualifier.rb +14 -0
  75. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +215 -0
  76. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +246 -0
  77. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_code_qualifier.rb +15 -0
  78. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +216 -0
  79. data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +72 -0
  80. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_admitting_diagnosis.rb +69 -0
  81. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_diagnosis_related_group.rb +69 -0
  82. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_diagnosis.rb +69 -0
  83. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_procedure_information.rb +71 -0
  84. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +236 -0
  85. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +206 -0
  86. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_qualifier.rb +13 -0
  87. data/lib/candidhealth/health_care_code_information/v_1/types/value_code.rb +119 -0
  88. data/lib/candidhealth/health_care_code_information/v_1/types/value_code_qualifier.rb +13 -0
  89. data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +245 -0
  90. data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +215 -0
  91. data/lib/candidhealth/individual/types/patient.rb +6 -6
  92. data/lib/candidhealth/individual/types/patient_base.rb +6 -6
  93. data/lib/candidhealth/individual/types/patient_create.rb +6 -6
  94. data/lib/candidhealth/individual/types/patient_update.rb +6 -6
  95. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +6 -6
  96. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
  97. data/lib/candidhealth/patient_ar/client.rb +30 -0
  98. data/lib/candidhealth/patient_ar/v_1/client.rb +161 -0
  99. data/lib/candidhealth/patient_ar/v_1/types/insurance_adjustment_info.rb +60 -0
  100. data/lib/candidhealth/patient_ar/v_1/types/insurance_payment_info.rb +60 -0
  101. data/lib/candidhealth/patient_ar/v_1/types/invalid_filters_error_type.rb +60 -0
  102. data/lib/candidhealth/patient_ar/v_1/types/inventory_record.rb +101 -0
  103. data/lib/candidhealth/patient_ar/v_1/types/invoice_itemization_response.rb +103 -0
  104. data/lib/candidhealth/patient_ar/v_1/types/list_inventory_paged_response.rb +77 -0
  105. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_adjustment_info.rb +60 -0
  106. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_payment_info.rb +60 -0
  107. data/lib/candidhealth/patient_ar/v_1/types/patient_adjustment_info.rb +60 -0
  108. data/lib/candidhealth/patient_ar/v_1/types/patient_ar_status.rb +14 -0
  109. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_allocation.rb +76 -0
  110. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_info.rb +75 -0
  111. data/lib/candidhealth/patient_ar/v_1/types/service_line_itemization.rb +210 -0
  112. data/lib/candidhealth/payers/client.rb +7 -0
  113. data/lib/candidhealth/payers/v_4/client.rb +137 -0
  114. data/lib/candidhealth/payers/v_4/types/clearinghouse_payer_info.rb +93 -0
  115. data/lib/candidhealth/payers/v_4/types/payer.rb +116 -0
  116. data/lib/candidhealth/payers/v_4/types/payer_ids.rb +107 -0
  117. data/lib/candidhealth/payers/v_4/types/payer_page.rb +88 -0
  118. data/lib/candidhealth/payers/v_4/types/support_state.rb +15 -0
  119. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
  120. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +3 -3
  121. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +204 -6
  122. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  123. data/lib/candidhealth/pre_encounter/patients/v_1/types/inferred_patient_metadata.rb +80 -0
  124. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +33 -5
  125. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +33 -5
  126. data/lib/candidhealth/pre_encounter/patients/v_1/types/origination_detail.rb +104 -0
  127. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +32 -4
  128. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_source.rb +18 -0
  129. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +17 -0
  130. data/lib/candidhealth/pre_encounter/patients/v_1/types/specialization_category.rb +42 -0
  131. data/lib/candidhealth/service_lines/v_2/client.rb +252 -10
  132. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +28 -10
  133. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +52 -40
  134. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +251 -0
  135. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +243 -0
  136. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +48 -24
  137. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +58 -46
  138. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base.rb +273 -0
  139. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base_base.rb +265 -0
  140. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +64 -54
  141. data/lib/candidhealth/service_lines/v_2/types/service_line_update_base.rb +263 -0
  142. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +271 -0
  143. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create_standalone.rb +317 -0
  144. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_update.rb +307 -0
  145. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +2 -2
  146. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_base.rb +90 -0
  147. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +112 -0
  148. data/lib/candidhealth.rb +21 -7
  149. data/lib/requests.rb +2 -2
  150. data/lib/types_export.rb +116 -13
  151. metadata +109 -2
@@ -0,0 +1,572 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../encounter_providers/v_2/types/billing_provider"
4
+ require_relative "../../encounter_providers/v_2/types/initial_referring_provider"
5
+ require_relative "../../encounter_providers/v_2/types/supervising_provider"
6
+ require_relative "../../service_facility/types/encounter_service_facility_base"
7
+ require_relative "../../encounters/v_4/types/clinical_note_category_create"
8
+ require_relative "../../billing_notes/v_2/types/billing_note_base"
9
+ require_relative "../../encounters/v_4/types/patient_history_category"
10
+ require_relative "../../claim_submission/v_1/types/external_claim_submission_create"
11
+ require_relative "../../custom_schemas/v_1/types/schema_instance"
12
+ require "date"
13
+ require_relative "../../encounters/v_4/types/medication"
14
+ require_relative "../../encounters/v_4/types/intervention"
15
+ require_relative "../../commons/types/street_address_long_zip"
16
+ require_relative "../../encounters/v_4/types/synchronicity_type"
17
+ require_relative "../../encounters/v_4/types/vitals"
18
+ require_relative "../../encounters/v_4/types/billable_status_type"
19
+ require_relative "../../encounters/v_4/types/service_authorization_exception_code"
20
+ require_relative "../../commons/types/delay_reason_code"
21
+ require "ostruct"
22
+ require "json"
23
+
24
+ module CandidApiClient
25
+ module EncountersUniversal
26
+ module Types
27
+ class UniversalEncounterCreateFromPreEncounterBase
28
+ # @return [String]
29
+ attr_reader :pre_encounter_patient_id
30
+ # @return [Array<String>]
31
+ attr_reader :pre_encounter_appointment_ids
32
+ # @return [CandidApiClient::EncounterProviders::V2::Types::BillingProvider] The billing provider is the provider or business entity submitting the claim.
33
+ # Billing provider may be, but is not necessarily, the same person/NPI as the
34
+ # rendering provider. From a payer's perspective, this represents the person or
35
+ # entity being reimbursed. When a contract exists with the target payer, the
36
+ # billing provider should be the entity contracted with the payer. In some
37
+ # circumstances, this will be an individual provider. In that case, submit that
38
+ # provider's NPI and the tax ID (TIN) that the provider gave to the payer during
39
+ # contracting. In other cases, the billing entity will be a medical group. If so,
40
+ # submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim or
41
+ # Form Locator 1 on a UB-04 claim form.
42
+ attr_reader :billing_provider
43
+ # @return [CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider] The second iteration of Loop ID-2310 on an 837P form. Use code "P3 - Primary
44
+ # Care Provider" in this loop to
45
+ # indicate the initial referral from the primary care provider or whatever
46
+ # provider wrote the initial referral for this patient's episode of care being
47
+ # billed/reported in this transaction.
48
+ # Not used in an 837i claim
49
+ attr_reader :initial_referring_provider
50
+ # @return [CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider] Required when the rendering provider is supervised by a physician. If not
51
+ # required by this implementation guide, do not send.
52
+ attr_reader :supervising_provider
53
+ # @return [CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase] Encounter Service facility is typically the location a medical service was
54
+ # rendered, such as a provider office or hospital. For telehealth, service
55
+ # facility can represent the provider's location when the service was delivered
56
+ # (e.g., home), or the location where an in-person visit would have taken place,
57
+ # whichever is easier to identify. If the provider is in-network, service facility
58
+ # may be defined in payer contracts. Box 32 on the CMS-1500 claim form. There is
59
+ # no equivalent on the paper UB-04 claim form, but this field is equivalent to
60
+ # Loop 2310E Service Facility Location details on an 837i form, and is used when
61
+ # this is different to the entity identified as the Billing Provider. Note that
62
+ # for an in-network claim to be successfully adjudicated, the service facility
63
+ # address listed
64
+ attr_reader :service_facility
65
+ # @return [Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>] Holds a collection of clinical observations made by healthcare providers during
66
+ # patient encounters. Please note that medical records for appeals should be sent
67
+ # using the Encounter Attachments API.
68
+ attr_reader :clinical_notes
69
+ # @return [Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>] Spot to store misc, human-readable, notes about this encounter to be used
70
+ # in the billing process.
71
+ attr_reader :billing_notes
72
+ # @return [Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>]
73
+ attr_reader :patient_histories
74
+ # @return [CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate] To be included for claims that have been submitted outside of Candid.
75
+ # Candid supports posting remits and payments to these claims and working them
76
+ # in-platform (e.g. editing, resubmitting).
77
+ attr_reader :external_claim_submission
78
+ # @return [Array<String>] Names of tags that should be on the encounter.
79
+ attr_reader :tag_ids
80
+ # @return [Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
81
+ # Multiple schema
82
+ # instances cannot be created for the same schema on an encounter.
83
+ attr_reader :schema_instances
84
+ # @return [String] A client-specified unique ID to associate with this encounter;
85
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
86
+ # This field should not contain PHI.
87
+ attr_reader :external_id
88
+ # @return [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
89
+ # This date must be the local date in the timezone where the service occurred.
90
+ # Box 24a on the CMS-1500 claim form or Form Locator 45 on the UB-04 claim form.
91
+ # If service occurred over a range of dates, this should be the start date.
92
+ # date_of_service must be defined on either the encounter or the service lines but
93
+ # not both.
94
+ # If there are greater than zero service lines, it is recommended to specify
95
+ # date_of_service on the service_line instead of on the encounter to prepare for
96
+ # future API versions.
97
+ attr_reader :date_of_service
98
+ # @return [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
99
+ # This date must be the local date in the timezone where the service occurred.
100
+ # If omitted, the Encounter is assumed to be for a single day.
101
+ # Must not be temporally before the date_of_service field.
102
+ # If there are greater than zero service lines, it is recommended to specify
103
+ # end_date_of_service on the service_line instead of on the encounter to prepare
104
+ # for future API versions.
105
+ attr_reader :end_date_of_service
106
+ # @return [Boolean] Whether this patient has authorized the release of medical information
107
+ # for billing purpose.
108
+ # Box 12 on the CMS-1500 claim form or Form Locator 52 on a UB-04 claim form.
109
+ attr_reader :patient_authorized_release
110
+ # @return [Boolean] Whether this patient has authorized insurance payments to be made to you,
111
+ # not them. If false, patient may receive reimbursement.
112
+ # Box 13 on the CMS-1500 claim form or Form Locator 53 on a UB-04 claim form.
113
+ attr_reader :benefits_assigned_to_provider
114
+ # @return [Boolean] Whether you have accepted the patient's authorization for insurance payments
115
+ # to be made to you, not them.
116
+ # Box 27 on the CMS-1500 claim form. There is no exact equivalent of this field on
117
+ # a UB-04 claim, however contributes to the concept of Form Locator 53.
118
+ attr_reader :provider_accepts_assignment
119
+ # @return [String] Human-readable description of the appointment type (ex: "Acupuncture -
120
+ # Headaches").
121
+ attr_reader :appointment_type
122
+ # @return [Array<CandidApiClient::Encounters::V4::Types::Medication>]
123
+ attr_reader :existing_medications
124
+ # @return [Array<CandidApiClient::Encounters::V4::Types::Intervention>]
125
+ attr_reader :interventions
126
+ # @return [CandidApiClient::Commons::Types::StreetAddressLongZip] Specifies the address to which payments for the claim should be sent.
127
+ attr_reader :pay_to_address
128
+ # @return [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
129
+ # Asynchronous encounters occur when providers and patients communicate online
130
+ # using
131
+ # forms, instant messaging, or other pre-recorded digital mediums.
132
+ # Synchronous encounters occur in live, real-time settings where the patient
133
+ # interacts
134
+ # directly with the provider, such as over video or a phone call.
135
+ attr_reader :synchronicity
136
+ # @return [CandidApiClient::Encounters::V4::Types::Vitals]
137
+ attr_reader :vitals
138
+ # @return [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
139
+ # Examples for when this should be set to NOT_BILLABLE include
140
+ # if the Encounter has not occurred yet or if there is no intention of ever
141
+ # billing the responsible_party.
142
+ attr_reader :billable_status
143
+ # @return [String] Defines additional information on the claim needed by the payer.
144
+ # Box 19 on the CMS-1500 claim form or Form Locator 80 on a UB-04 claim form.
145
+ attr_reader :additional_information
146
+ # @return [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
147
+ # Required when mandated by government law or regulation to obtain authorization
148
+ # for specific service(s) but, for the
149
+ # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
150
+ # the service was performed without
151
+ # obtaining the authorization.
152
+ attr_reader :service_authorization_exception_code
153
+ # @return [Date] 837p Loop2300 DTP*435, CMS-1500 Box 18 or UB-04 Form Locator 12.
154
+ # Required on all ambulance claims when the patient was known to be admitted to
155
+ # the hospital.
156
+ # OR
157
+ # Required on all claims involving inpatient medical visits.
158
+ attr_reader :admission_date
159
+ # @return [Date] 837p Loop2300 DTP*096, CMS-1500 Box 18 Required for inpatient claims when the
160
+ # patient was discharged from the facility and the discharge date is known. Not
161
+ # used on an institutional claim.
162
+ attr_reader :discharge_date
163
+ # @return [Date] 837p Loop2300 DTP*431, CMS-1500 Box 14
164
+ # Required for the initial medical service or visit performed in response to a
165
+ # medical emergency when the date is available and is different than the date of
166
+ # service.
167
+ # OR
168
+ # This date is the onset of acute symptoms for the current illness or condition.
169
+ # For UB-04 claims, this is populated separately via occurrence codes.
170
+ attr_reader :onset_of_current_illness_or_symptom_date
171
+ # @return [Date] 837p Loop2300 DTP*484, CMS-1500 Box 14
172
+ # Required when, in the judgment of the provider, the services on this claim are
173
+ # related to the patient's pregnancy.
174
+ # This field is populated separately via occurrence codes for UB-04 claim forms.
175
+ attr_reader :last_menstrual_period_date
176
+ # @return [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
177
+ # Code indicating the reason why a request was delayed
178
+ attr_reader :delay_reason_code
179
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
180
+ attr_reader :additional_properties
181
+ # @return [Object]
182
+ attr_reader :_field_set
183
+ protected :_field_set
184
+
185
+ OMIT = Object.new
186
+
187
+ # @param pre_encounter_patient_id [String]
188
+ # @param pre_encounter_appointment_ids [Array<String>]
189
+ # @param billing_provider [CandidApiClient::EncounterProviders::V2::Types::BillingProvider] The billing provider is the provider or business entity submitting the claim.
190
+ # Billing provider may be, but is not necessarily, the same person/NPI as the
191
+ # rendering provider. From a payer's perspective, this represents the person or
192
+ # entity being reimbursed. When a contract exists with the target payer, the
193
+ # billing provider should be the entity contracted with the payer. In some
194
+ # circumstances, this will be an individual provider. In that case, submit that
195
+ # provider's NPI and the tax ID (TIN) that the provider gave to the payer during
196
+ # contracting. In other cases, the billing entity will be a medical group. If so,
197
+ # submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim or
198
+ # Form Locator 1 on a UB-04 claim form.
199
+ # @param initial_referring_provider [CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider] The second iteration of Loop ID-2310 on an 837P form. Use code "P3 - Primary
200
+ # Care Provider" in this loop to
201
+ # indicate the initial referral from the primary care provider or whatever
202
+ # provider wrote the initial referral for this patient's episode of care being
203
+ # billed/reported in this transaction.
204
+ # Not used in an 837i claim
205
+ # @param supervising_provider [CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider] Required when the rendering provider is supervised by a physician. If not
206
+ # required by this implementation guide, do not send.
207
+ # @param service_facility [CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase] Encounter Service facility is typically the location a medical service was
208
+ # rendered, such as a provider office or hospital. For telehealth, service
209
+ # facility can represent the provider's location when the service was delivered
210
+ # (e.g., home), or the location where an in-person visit would have taken place,
211
+ # whichever is easier to identify. If the provider is in-network, service facility
212
+ # may be defined in payer contracts. Box 32 on the CMS-1500 claim form. There is
213
+ # no equivalent on the paper UB-04 claim form, but this field is equivalent to
214
+ # Loop 2310E Service Facility Location details on an 837i form, and is used when
215
+ # this is different to the entity identified as the Billing Provider. Note that
216
+ # for an in-network claim to be successfully adjudicated, the service facility
217
+ # address listed
218
+ # @param clinical_notes [Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>] Holds a collection of clinical observations made by healthcare providers during
219
+ # patient encounters. Please note that medical records for appeals should be sent
220
+ # using the Encounter Attachments API.
221
+ # @param billing_notes [Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>] Spot to store misc, human-readable, notes about this encounter to be used
222
+ # in the billing process.
223
+ # @param patient_histories [Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>]
224
+ # @param external_claim_submission [CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate] To be included for claims that have been submitted outside of Candid.
225
+ # Candid supports posting remits and payments to these claims and working them
226
+ # in-platform (e.g. editing, resubmitting).
227
+ # @param tag_ids [Array<String>] Names of tags that should be on the encounter.
228
+ # @param schema_instances [Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
229
+ # Multiple schema
230
+ # instances cannot be created for the same schema on an encounter.
231
+ # @param external_id [String] A client-specified unique ID to associate with this encounter;
232
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
233
+ # This field should not contain PHI.
234
+ # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
235
+ # This date must be the local date in the timezone where the service occurred.
236
+ # Box 24a on the CMS-1500 claim form or Form Locator 45 on the UB-04 claim form.
237
+ # If service occurred over a range of dates, this should be the start date.
238
+ # date_of_service must be defined on either the encounter or the service lines but
239
+ # not both.
240
+ # If there are greater than zero service lines, it is recommended to specify
241
+ # date_of_service on the service_line instead of on the encounter to prepare for
242
+ # future API versions.
243
+ # @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
244
+ # This date must be the local date in the timezone where the service occurred.
245
+ # If omitted, the Encounter is assumed to be for a single day.
246
+ # Must not be temporally before the date_of_service field.
247
+ # If there are greater than zero service lines, it is recommended to specify
248
+ # end_date_of_service on the service_line instead of on the encounter to prepare
249
+ # for future API versions.
250
+ # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
251
+ # for billing purpose.
252
+ # Box 12 on the CMS-1500 claim form or Form Locator 52 on a UB-04 claim form.
253
+ # @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you,
254
+ # not them. If false, patient may receive reimbursement.
255
+ # Box 13 on the CMS-1500 claim form or Form Locator 53 on a UB-04 claim form.
256
+ # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
257
+ # to be made to you, not them.
258
+ # Box 27 on the CMS-1500 claim form. There is no exact equivalent of this field on
259
+ # a UB-04 claim, however contributes to the concept of Form Locator 53.
260
+ # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
261
+ # Headaches").
262
+ # @param existing_medications [Array<CandidApiClient::Encounters::V4::Types::Medication>]
263
+ # @param interventions [Array<CandidApiClient::Encounters::V4::Types::Intervention>]
264
+ # @param pay_to_address [CandidApiClient::Commons::Types::StreetAddressLongZip] Specifies the address to which payments for the claim should be sent.
265
+ # @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
266
+ # Asynchronous encounters occur when providers and patients communicate online
267
+ # using
268
+ # forms, instant messaging, or other pre-recorded digital mediums.
269
+ # Synchronous encounters occur in live, real-time settings where the patient
270
+ # interacts
271
+ # directly with the provider, such as over video or a phone call.
272
+ # @param vitals [CandidApiClient::Encounters::V4::Types::Vitals]
273
+ # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
274
+ # Examples for when this should be set to NOT_BILLABLE include
275
+ # if the Encounter has not occurred yet or if there is no intention of ever
276
+ # billing the responsible_party.
277
+ # @param additional_information [String] Defines additional information on the claim needed by the payer.
278
+ # Box 19 on the CMS-1500 claim form or Form Locator 80 on a UB-04 claim form.
279
+ # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
280
+ # Required when mandated by government law or regulation to obtain authorization
281
+ # for specific service(s) but, for the
282
+ # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
283
+ # the service was performed without
284
+ # obtaining the authorization.
285
+ # @param admission_date [Date] 837p Loop2300 DTP*435, CMS-1500 Box 18 or UB-04 Form Locator 12.
286
+ # Required on all ambulance claims when the patient was known to be admitted to
287
+ # the hospital.
288
+ # OR
289
+ # Required on all claims involving inpatient medical visits.
290
+ # @param discharge_date [Date] 837p Loop2300 DTP*096, CMS-1500 Box 18 Required for inpatient claims when the
291
+ # patient was discharged from the facility and the discharge date is known. Not
292
+ # used on an institutional claim.
293
+ # @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP*431, CMS-1500 Box 14
294
+ # Required for the initial medical service or visit performed in response to a
295
+ # medical emergency when the date is available and is different than the date of
296
+ # service.
297
+ # OR
298
+ # This date is the onset of acute symptoms for the current illness or condition.
299
+ # For UB-04 claims, this is populated separately via occurrence codes.
300
+ # @param last_menstrual_period_date [Date] 837p Loop2300 DTP*484, CMS-1500 Box 14
301
+ # Required when, in the judgment of the provider, the services on this claim are
302
+ # related to the patient's pregnancy.
303
+ # This field is populated separately via occurrence codes for UB-04 claim forms.
304
+ # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
305
+ # Code indicating the reason why a request was delayed
306
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
307
+ # @return [CandidApiClient::EncountersUniversal::Types::UniversalEncounterCreateFromPreEncounterBase]
308
+ def initialize(pre_encounter_patient_id:, pre_encounter_appointment_ids:, billing_provider:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:,
309
+ initial_referring_provider: OMIT, supervising_provider: OMIT, service_facility: OMIT, clinical_notes: OMIT, billing_notes: OMIT, patient_histories: OMIT, external_claim_submission: OMIT, tag_ids: OMIT, schema_instances: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, appointment_type: OMIT, existing_medications: OMIT, interventions: OMIT, pay_to_address: OMIT, synchronicity: OMIT, vitals: 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, additional_properties: nil)
310
+ @pre_encounter_patient_id = pre_encounter_patient_id
311
+ @pre_encounter_appointment_ids = pre_encounter_appointment_ids
312
+ @billing_provider = billing_provider
313
+ @initial_referring_provider = initial_referring_provider if initial_referring_provider != OMIT
314
+ @supervising_provider = supervising_provider if supervising_provider != OMIT
315
+ @service_facility = service_facility if service_facility != OMIT
316
+ @clinical_notes = clinical_notes if clinical_notes != OMIT
317
+ @billing_notes = billing_notes if billing_notes != OMIT
318
+ @patient_histories = patient_histories if patient_histories != OMIT
319
+ @external_claim_submission = external_claim_submission if external_claim_submission != OMIT
320
+ @tag_ids = tag_ids if tag_ids != OMIT
321
+ @schema_instances = schema_instances if schema_instances != OMIT
322
+ @external_id = external_id
323
+ @date_of_service = date_of_service if date_of_service != OMIT
324
+ @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
325
+ @patient_authorized_release = patient_authorized_release
326
+ @benefits_assigned_to_provider = benefits_assigned_to_provider
327
+ @provider_accepts_assignment = provider_accepts_assignment
328
+ @appointment_type = appointment_type if appointment_type != OMIT
329
+ @existing_medications = existing_medications if existing_medications != OMIT
330
+ @interventions = interventions if interventions != OMIT
331
+ @pay_to_address = pay_to_address if pay_to_address != OMIT
332
+ @synchronicity = synchronicity if synchronicity != OMIT
333
+ @vitals = vitals if vitals != OMIT
334
+ @billable_status = billable_status
335
+ @additional_information = additional_information if additional_information != OMIT
336
+ if service_authorization_exception_code != OMIT
337
+ @service_authorization_exception_code = service_authorization_exception_code
338
+ end
339
+ @admission_date = admission_date if admission_date != OMIT
340
+ @discharge_date = discharge_date if discharge_date != OMIT
341
+ if onset_of_current_illness_or_symptom_date != OMIT
342
+ @onset_of_current_illness_or_symptom_date = onset_of_current_illness_or_symptom_date
343
+ end
344
+ @last_menstrual_period_date = last_menstrual_period_date if last_menstrual_period_date != OMIT
345
+ @delay_reason_code = delay_reason_code if delay_reason_code != OMIT
346
+ @additional_properties = additional_properties
347
+ @_field_set = {
348
+ "pre_encounter_patient_id": pre_encounter_patient_id,
349
+ "pre_encounter_appointment_ids": pre_encounter_appointment_ids,
350
+ "billing_provider": billing_provider,
351
+ "initial_referring_provider": initial_referring_provider,
352
+ "supervising_provider": supervising_provider,
353
+ "service_facility": service_facility,
354
+ "clinical_notes": clinical_notes,
355
+ "billing_notes": billing_notes,
356
+ "patient_histories": patient_histories,
357
+ "external_claim_submission": external_claim_submission,
358
+ "tag_ids": tag_ids,
359
+ "schema_instances": schema_instances,
360
+ "external_id": external_id,
361
+ "date_of_service": date_of_service,
362
+ "end_date_of_service": end_date_of_service,
363
+ "patient_authorized_release": patient_authorized_release,
364
+ "benefits_assigned_to_provider": benefits_assigned_to_provider,
365
+ "provider_accepts_assignment": provider_accepts_assignment,
366
+ "appointment_type": appointment_type,
367
+ "existing_medications": existing_medications,
368
+ "interventions": interventions,
369
+ "pay_to_address": pay_to_address,
370
+ "synchronicity": synchronicity,
371
+ "vitals": vitals,
372
+ "billable_status": billable_status,
373
+ "additional_information": additional_information,
374
+ "service_authorization_exception_code": service_authorization_exception_code,
375
+ "admission_date": admission_date,
376
+ "discharge_date": discharge_date,
377
+ "onset_of_current_illness_or_symptom_date": onset_of_current_illness_or_symptom_date,
378
+ "last_menstrual_period_date": last_menstrual_period_date,
379
+ "delay_reason_code": delay_reason_code
380
+ }.reject do |_k, v|
381
+ v == OMIT
382
+ end
383
+ end
384
+
385
+ # Deserialize a JSON object to an instance of
386
+ # UniversalEncounterCreateFromPreEncounterBase
387
+ #
388
+ # @param json_object [String]
389
+ # @return [CandidApiClient::EncountersUniversal::Types::UniversalEncounterCreateFromPreEncounterBase]
390
+ def self.from_json(json_object:)
391
+ struct = JSON.parse(json_object, object_class: OpenStruct)
392
+ parsed_json = JSON.parse(json_object)
393
+ pre_encounter_patient_id = struct["pre_encounter_patient_id"]
394
+ pre_encounter_appointment_ids = struct["pre_encounter_appointment_ids"]
395
+ if parsed_json["billing_provider"].nil?
396
+ billing_provider = nil
397
+ else
398
+ billing_provider = parsed_json["billing_provider"].to_json
399
+ billing_provider = CandidApiClient::EncounterProviders::V2::Types::BillingProvider.from_json(json_object: billing_provider)
400
+ end
401
+ if parsed_json["initial_referring_provider"].nil?
402
+ initial_referring_provider = nil
403
+ else
404
+ initial_referring_provider = parsed_json["initial_referring_provider"].to_json
405
+ initial_referring_provider = CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider.from_json(json_object: initial_referring_provider)
406
+ end
407
+ if parsed_json["supervising_provider"].nil?
408
+ supervising_provider = nil
409
+ else
410
+ supervising_provider = parsed_json["supervising_provider"].to_json
411
+ supervising_provider = CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider.from_json(json_object: supervising_provider)
412
+ end
413
+ if parsed_json["service_facility"].nil?
414
+ service_facility = nil
415
+ else
416
+ service_facility = parsed_json["service_facility"].to_json
417
+ service_facility = CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase.from_json(json_object: service_facility)
418
+ end
419
+ clinical_notes = parsed_json["clinical_notes"]&.map do |item|
420
+ item = item.to_json
421
+ CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate.from_json(json_object: item)
422
+ end
423
+ billing_notes = parsed_json["billing_notes"]&.map do |item|
424
+ item = item.to_json
425
+ CandidApiClient::BillingNotes::V2::Types::BillingNoteBase.from_json(json_object: item)
426
+ end
427
+ patient_histories = parsed_json["patient_histories"]&.map do |item|
428
+ item = item.to_json
429
+ CandidApiClient::Encounters::V4::Types::PatientHistoryCategory.from_json(json_object: item)
430
+ end
431
+ if parsed_json["external_claim_submission"].nil?
432
+ external_claim_submission = nil
433
+ else
434
+ external_claim_submission = parsed_json["external_claim_submission"].to_json
435
+ external_claim_submission = CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate.from_json(json_object: external_claim_submission)
436
+ end
437
+ tag_ids = struct["tag_ids"]
438
+ schema_instances = parsed_json["schema_instances"]&.map do |item|
439
+ item = item.to_json
440
+ CandidApiClient::CustomSchemas::V1::Types::SchemaInstance.from_json(json_object: item)
441
+ end
442
+ external_id = struct["external_id"]
443
+ date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
444
+ end_date_of_service = unless parsed_json["end_date_of_service"].nil?
445
+ Date.parse(parsed_json["end_date_of_service"])
446
+ end
447
+ patient_authorized_release = struct["patient_authorized_release"]
448
+ benefits_assigned_to_provider = struct["benefits_assigned_to_provider"]
449
+ provider_accepts_assignment = struct["provider_accepts_assignment"]
450
+ appointment_type = struct["appointment_type"]
451
+ existing_medications = parsed_json["existing_medications"]&.map do |item|
452
+ item = item.to_json
453
+ CandidApiClient::Encounters::V4::Types::Medication.from_json(json_object: item)
454
+ end
455
+ interventions = parsed_json["interventions"]&.map do |item|
456
+ item = item.to_json
457
+ CandidApiClient::Encounters::V4::Types::Intervention.from_json(json_object: item)
458
+ end
459
+ if parsed_json["pay_to_address"].nil?
460
+ pay_to_address = nil
461
+ else
462
+ pay_to_address = parsed_json["pay_to_address"].to_json
463
+ pay_to_address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: pay_to_address)
464
+ end
465
+ synchronicity = struct["synchronicity"]
466
+ if parsed_json["vitals"].nil?
467
+ vitals = nil
468
+ else
469
+ vitals = parsed_json["vitals"].to_json
470
+ vitals = CandidApiClient::Encounters::V4::Types::Vitals.from_json(json_object: vitals)
471
+ end
472
+ billable_status = struct["billable_status"]
473
+ additional_information = struct["additional_information"]
474
+ service_authorization_exception_code = struct["service_authorization_exception_code"]
475
+ admission_date = (Date.parse(parsed_json["admission_date"]) unless parsed_json["admission_date"].nil?)
476
+ discharge_date = (Date.parse(parsed_json["discharge_date"]) unless parsed_json["discharge_date"].nil?)
477
+ onset_of_current_illness_or_symptom_date = unless parsed_json["onset_of_current_illness_or_symptom_date"].nil?
478
+ Date.parse(parsed_json["onset_of_current_illness_or_symptom_date"])
479
+ end
480
+ last_menstrual_period_date = unless parsed_json["last_menstrual_period_date"].nil?
481
+ Date.parse(parsed_json["last_menstrual_period_date"])
482
+ end
483
+ delay_reason_code = struct["delay_reason_code"]
484
+ new(
485
+ pre_encounter_patient_id: pre_encounter_patient_id,
486
+ pre_encounter_appointment_ids: pre_encounter_appointment_ids,
487
+ billing_provider: billing_provider,
488
+ initial_referring_provider: initial_referring_provider,
489
+ supervising_provider: supervising_provider,
490
+ service_facility: service_facility,
491
+ clinical_notes: clinical_notes,
492
+ billing_notes: billing_notes,
493
+ patient_histories: patient_histories,
494
+ external_claim_submission: external_claim_submission,
495
+ tag_ids: tag_ids,
496
+ schema_instances: schema_instances,
497
+ external_id: external_id,
498
+ date_of_service: date_of_service,
499
+ end_date_of_service: end_date_of_service,
500
+ patient_authorized_release: patient_authorized_release,
501
+ benefits_assigned_to_provider: benefits_assigned_to_provider,
502
+ provider_accepts_assignment: provider_accepts_assignment,
503
+ appointment_type: appointment_type,
504
+ existing_medications: existing_medications,
505
+ interventions: interventions,
506
+ pay_to_address: pay_to_address,
507
+ synchronicity: synchronicity,
508
+ vitals: vitals,
509
+ billable_status: billable_status,
510
+ additional_information: additional_information,
511
+ service_authorization_exception_code: service_authorization_exception_code,
512
+ admission_date: admission_date,
513
+ discharge_date: discharge_date,
514
+ onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
515
+ last_menstrual_period_date: last_menstrual_period_date,
516
+ delay_reason_code: delay_reason_code,
517
+ additional_properties: struct
518
+ )
519
+ end
520
+
521
+ # Serialize an instance of UniversalEncounterCreateFromPreEncounterBase to a JSON
522
+ # object
523
+ #
524
+ # @return [String]
525
+ def to_json(*_args)
526
+ @_field_set&.to_json
527
+ end
528
+
529
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
530
+ # hash and check each fields type against the current object's property
531
+ # definitions.
532
+ #
533
+ # @param obj [Object]
534
+ # @return [Void]
535
+ def self.validate_raw(obj:)
536
+ obj.pre_encounter_patient_id.is_a?(String) != false || raise("Passed value for field obj.pre_encounter_patient_id is not the expected type, validation failed.")
537
+ obj.pre_encounter_appointment_ids.is_a?(Array) != false || raise("Passed value for field obj.pre_encounter_appointment_ids is not the expected type, validation failed.")
538
+ CandidApiClient::EncounterProviders::V2::Types::BillingProvider.validate_raw(obj: obj.billing_provider)
539
+ obj.initial_referring_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider.validate_raw(obj: obj.initial_referring_provider)
540
+ obj.supervising_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider.validate_raw(obj: obj.supervising_provider)
541
+ obj.service_facility.nil? || CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase.validate_raw(obj: obj.service_facility)
542
+ obj.clinical_notes&.is_a?(Array) != false || raise("Passed value for field obj.clinical_notes is not the expected type, validation failed.")
543
+ obj.billing_notes&.is_a?(Array) != false || raise("Passed value for field obj.billing_notes is not the expected type, validation failed.")
544
+ obj.patient_histories&.is_a?(Array) != false || raise("Passed value for field obj.patient_histories is not the expected type, validation failed.")
545
+ obj.external_claim_submission.nil? || CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate.validate_raw(obj: obj.external_claim_submission)
546
+ obj.tag_ids&.is_a?(Array) != false || raise("Passed value for field obj.tag_ids is not the expected type, validation failed.")
547
+ obj.schema_instances&.is_a?(Array) != false || raise("Passed value for field obj.schema_instances is not the expected type, validation failed.")
548
+ obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
549
+ obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
550
+ 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.")
551
+ obj.patient_authorized_release.is_a?(Boolean) != false || raise("Passed value for field obj.patient_authorized_release is not the expected type, validation failed.")
552
+ obj.benefits_assigned_to_provider.is_a?(Boolean) != false || raise("Passed value for field obj.benefits_assigned_to_provider is not the expected type, validation failed.")
553
+ obj.provider_accepts_assignment.is_a?(Boolean) != false || raise("Passed value for field obj.provider_accepts_assignment is not the expected type, validation failed.")
554
+ obj.appointment_type&.is_a?(String) != false || raise("Passed value for field obj.appointment_type is not the expected type, validation failed.")
555
+ obj.existing_medications&.is_a?(Array) != false || raise("Passed value for field obj.existing_medications is not the expected type, validation failed.")
556
+ obj.interventions&.is_a?(Array) != false || raise("Passed value for field obj.interventions is not the expected type, validation failed.")
557
+ obj.pay_to_address.nil? || CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.pay_to_address)
558
+ obj.synchronicity&.is_a?(CandidApiClient::Encounters::V4::Types::SynchronicityType) != false || raise("Passed value for field obj.synchronicity is not the expected type, validation failed.")
559
+ obj.vitals.nil? || CandidApiClient::Encounters::V4::Types::Vitals.validate_raw(obj: obj.vitals)
560
+ 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.")
561
+ obj.additional_information&.is_a?(String) != false || raise("Passed value for field obj.additional_information is not the expected type, validation failed.")
562
+ 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.")
563
+ obj.admission_date&.is_a?(Date) != false || raise("Passed value for field obj.admission_date is not the expected type, validation failed.")
564
+ obj.discharge_date&.is_a?(Date) != false || raise("Passed value for field obj.discharge_date is not the expected type, validation failed.")
565
+ obj.onset_of_current_illness_or_symptom_date&.is_a?(Date) != false || raise("Passed value for field obj.onset_of_current_illness_or_symptom_date is not the expected type, validation failed.")
566
+ 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.")
567
+ 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.")
568
+ end
569
+ end
570
+ end
571
+ end
572
+ end