candidhealth 1.7.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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +34 -6
  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/encounter_providers/v_2/types/billing_provider.rb +1 -1
  8. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +1 -1
  9. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +1 -1
  10. data/lib/candidhealth/encounters/v_4/client.rb +3253 -2040
  11. data/lib/candidhealth/encounters/v_4/types/encounter.rb +111 -86
  12. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +39 -33
  13. data/lib/candidhealth/encounters/v_4/types/encounter_create.rb +796 -0
  14. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +131 -117
  15. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +70 -56
  16. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +29 -39
  17. data/lib/candidhealth/encounters/v_4/types/encounter_rendering_or_attending_provider_required_error.rb +55 -0
  18. data/lib/candidhealth/encounters/v_4/types/encounter_update.rb +736 -0
  19. data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +944 -0
  20. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_base.rb +691 -0
  21. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +791 -0
  22. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb +572 -0
  23. data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +872 -0
  24. data/lib/candidhealth/encounters_universal/types/universal_encounter_update_base.rb +700 -0
  25. data/lib/candidhealth/fee_schedules/v_3/client.rb +57 -0
  26. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +12 -0
  27. data/lib/candidhealth/financials/types/patient_transaction_source.rb +1 -0
  28. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +206 -0
  29. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +207 -0
  30. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +206 -0
  31. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +245 -0
  32. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +225 -0
  33. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +219 -0
  34. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +222 -0
  35. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +215 -0
  36. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +218 -0
  37. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +206 -0
  38. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +215 -0
  39. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +216 -0
  40. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +206 -0
  41. data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +215 -0
  42. data/lib/candidhealth/individual/types/patient.rb +6 -6
  43. data/lib/candidhealth/individual/types/patient_base.rb +6 -6
  44. data/lib/candidhealth/individual/types/patient_create.rb +6 -6
  45. data/lib/candidhealth/individual/types/patient_update.rb +6 -6
  46. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +6 -6
  47. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
  48. data/lib/candidhealth/payers/client.rb +7 -0
  49. data/lib/candidhealth/payers/v_4/client.rb +137 -0
  50. data/lib/candidhealth/payers/v_4/types/clearinghouse_payer_info.rb +93 -0
  51. data/lib/candidhealth/payers/v_4/types/payer.rb +116 -0
  52. data/lib/candidhealth/payers/v_4/types/payer_ids.rb +107 -0
  53. data/lib/candidhealth/payers/v_4/types/payer_page.rb +88 -0
  54. data/lib/candidhealth/payers/v_4/types/support_state.rb +15 -0
  55. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
  56. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +3 -3
  57. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +72 -6
  58. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  59. data/lib/candidhealth/pre_encounter/patients/v_1/types/inferred_patient_metadata.rb +80 -0
  60. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +19 -5
  61. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +19 -5
  62. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +18 -4
  63. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +1 -0
  64. data/lib/candidhealth/service_lines/v_2/client.rb +252 -10
  65. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +28 -10
  66. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +52 -40
  67. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +251 -0
  68. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +243 -0
  69. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +48 -24
  70. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +58 -46
  71. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base.rb +273 -0
  72. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base_base.rb +265 -0
  73. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +64 -54
  74. data/lib/candidhealth/service_lines/v_2/types/service_line_update_base.rb +263 -0
  75. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +271 -0
  76. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create_standalone.rb +317 -0
  77. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_update.rb +307 -0
  78. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +2 -2
  79. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_base.rb +90 -0
  80. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +112 -0
  81. data/lib/requests.rb +2 -2
  82. data/lib/types_export.rb +44 -4
  83. metadata +43 -2
@@ -0,0 +1,944 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../encounter_providers/v_2/types/billing_provider"
4
+ require_relative "../../commons/types/facility_type_code"
5
+ require_relative "../../encounter_providers/v_2/types/rendering_provider"
6
+ require_relative "../../service_lines/v_2/types/universal_service_line_create"
7
+ require_relative "../../health_care_code_information/v_1/types/health_care_code_information_create"
8
+ require_relative "../../encounters/v_4/types/encounter_submission_expectation"
9
+ require_relative "../../x_12/v_1/types/type_of_admission_or_visit_code"
10
+ require_relative "../../x_12/v_1/types/point_of_origin_for_admission_or_visit_code"
11
+ require_relative "../../x_12/v_1/types/patient_discharge_status_code"
12
+ require_relative "../../x_12/v_1/types/type_of_bill_composite_update"
13
+ require_relative "../../commons/types/state"
14
+ require_relative "../../individual/types/patient_create"
15
+ require_relative "../../encounter_providers/v_2/types/referring_provider"
16
+ require_relative "../../encounter_providers/v_2/types/initial_referring_provider"
17
+ require_relative "../../encounter_providers/v_2/types/supervising_provider"
18
+ require_relative "../../service_facility/types/encounter_service_facility_base"
19
+ require_relative "../../individual/types/subscriber_create"
20
+ require_relative "../../encounters/v_4/types/responsible_party_type"
21
+ require_relative "../../encounters/v_4/types/clinical_note_category_create"
22
+ require_relative "../../billing_notes/v_2/types/billing_note_base"
23
+ require_relative "../../encounters/v_4/types/patient_history_category"
24
+ require_relative "../../guarantor/v_1/types/guarantor_create"
25
+ require_relative "../../claim_submission/v_1/types/external_claim_submission_create"
26
+ require_relative "../../custom_schemas/v_1/types/schema_instance"
27
+ require_relative "../../encounters/v_4/types/epsdt_referral"
28
+ require_relative "../../encounters/v_4/types/claim_supplemental_information"
29
+ require "date"
30
+ require_relative "../../encounters/v_4/types/medication"
31
+ require_relative "../../encounters/v_4/types/intervention"
32
+ require_relative "../../commons/types/street_address_long_zip"
33
+ require_relative "../../encounters/v_4/types/synchronicity_type"
34
+ require_relative "../../encounters/v_4/types/vitals"
35
+ require_relative "../../encounters/v_4/types/billable_status_type"
36
+ require_relative "../../encounters/v_4/types/service_authorization_exception_code"
37
+ require_relative "../../commons/types/delay_reason_code"
38
+ require "ostruct"
39
+ require "json"
40
+
41
+ module CandidApiClient
42
+ module EncountersUniversal
43
+ module Types
44
+ class UniversalEncounterCreate
45
+ # @return [CandidApiClient::EncounterProviders::V2::Types::BillingProvider] The billing provider is the provider or business entity submitting the claim.
46
+ # Billing provider may be, but is not necessarily, the same person/NPI as the
47
+ # rendering provider. From a payer's perspective, this represents the person or
48
+ # entity being reimbursed. When a contract exists with the target payer, the
49
+ # billing provider should be the entity contracted with the payer. In some
50
+ # circumstances, this will be an individual provider. In that case, submit that
51
+ # provider's NPI and the tax ID (TIN) that the provider gave to the payer during
52
+ # contracting. In other cases, the billing entity will be a medical group. If so,
53
+ # submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim or
54
+ # Form Locator 1 on a UB-04 claim form.
55
+ attr_reader :billing_provider
56
+ # @return [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. This box is not
57
+ # used on a UB-04 or 837i claim form. 02 for telemedicine, 11 for in-person. Full
58
+ # list
59
+ # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
60
+ attr_reader :place_of_service_code
61
+ # @return [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] The rendering provider is the practitioner -- physician, nurse practitioner,
62
+ # etc. -- performing the service.
63
+ # For telehealth services, the rendering provider performs the visit, asynchronous
64
+ # communication, or other service. The rendering provider address should generally
65
+ # be the same as the service facility address.
66
+ attr_reader :rendering_provider
67
+ # @return [Array<CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreate>]
68
+ attr_reader :service_lines
69
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::HealthCareCodeInformationCreate] The health care code information associated with this encounter, which includes
70
+ # things such as diagnoses, vitals, procedures, occurrences, reason for visit, and
71
+ # numerous other code related fields.
72
+ attr_reader :health_care_code_information
73
+ # @return [CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation] Describes the currently expected target form for this encounter. This can
74
+ # change later, but it orients this encounter in the pipeline and effects
75
+ # reporting.
76
+ attr_reader :submission_expectation
77
+ # @return [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
78
+ # has overall responsibility for the patient in institutional claims processing.
79
+ attr_reader :attending_provider
80
+ # @return [Integer] 837i Loop 2300 DTP-03
81
+ # Extension of the admission date with hour (0-23 integer) details.
82
+ attr_reader :admission_hour
83
+ # @return [CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode] 837i Loop 2300 CL1-01 Code used to indicate the priority of an admission or
84
+ # visit. Equivalent to Form Locator 14 Priority of Admission on a UB-04 claim, not
85
+ # used on CMS-1500 claim forms.
86
+ attr_reader :admission_type_code
87
+ # @return [CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode] 837i Loop 2300 CLI1-02 Code used to indicate the conditions under which an
88
+ # admission occurs. Equivalent to Form Locator 15 Point of Origin on a UB-04
89
+ # claim, not used on CMS-1500 claim forms.
90
+ attr_reader :admission_source_code
91
+ # @return [Integer] 837i Loop 2300 DTP-03
92
+ # Extension of the discharge date with hour (0-23 integer) details.
93
+ attr_reader :discharge_hour
94
+ # @return [CandidApiClient::X12::V1::Types::PatientDischargeStatusCode] 837i CL1-03 or Form Locator 17 on a UB-04 claim form. This is a required field
95
+ # on UB-04 claims.
96
+ # Code indicating patient status as of the "statement covers through date" .
97
+ attr_reader :discharge_status
98
+ # @return [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
99
+ # has primary responsibility for surgical procedures in institutional claims
100
+ # processing.
101
+ attr_reader :operating_provider
102
+ # @return [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
103
+ # has secondary responsibility for surgical procedures in institutional claims
104
+ # processing. Only used when operating_provider is also set.
105
+ attr_reader :other_operating_provider
106
+ # @return [CandidApiClient::X12::V1::Types::TypeOfBillCompositeUpdate] Four digit code used in institutional forms to indicate the type of bill (e.g.,
107
+ # hospital inpatient, hospital outpatient). First digit is a leading 0, followed
108
+ # by the type_of_facility, type_of_care, then frequency_code. Professional forms
109
+ # are not required to submit this attribute. You may send the 4 digit code via
110
+ # raw_code, or each individual digit separately via composite_codes.
111
+ attr_reader :type_of_bill
112
+ # @return [CandidApiClient::Commons::Types::State] 837i-REF1000 -- an optional state indicating where an accident related to the
113
+ # encounter occurred.
114
+ attr_reader :accident_state_or_province_code
115
+ # @return [CandidApiClient::Individual::Types::PatientCreate] Contains the identification information of the individual receiving medical
116
+ # services.
117
+ attr_reader :patient
118
+ # @return [CandidApiClient::EncounterProviders::V2::Types::ReferringProvider] The final provider who referred the services that were rendered.
119
+ # All physicians who order services or refer Medicare beneficiaries must
120
+ # report this data.
121
+ attr_reader :referring_provider
122
+ # @return [CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider] The second iteration of Loop ID-2310 on an 837P form. Use code "P3 - Primary
123
+ # Care Provider" in this loop to
124
+ # indicate the initial referral from the primary care provider or whatever
125
+ # provider wrote the initial referral for this patient's episode of care being
126
+ # billed/reported in this transaction.
127
+ # Not used in an 837i claim
128
+ attr_reader :initial_referring_provider
129
+ # @return [CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider] Required when the rendering provider is supervised by a physician. If not
130
+ # required by this implementation guide, do not send.
131
+ attr_reader :supervising_provider
132
+ # @return [CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase] Encounter Service facility is typically the location a medical service was
133
+ # rendered, such as a provider office or hospital. For telehealth, service
134
+ # facility can represent the provider's location when the service was delivered
135
+ # (e.g., home), or the location where an in-person visit would have taken place,
136
+ # whichever is easier to identify. If the provider is in-network, service facility
137
+ # may be defined in payer contracts. Box 32 on the CMS-1500 claim form. There is
138
+ # no equivalent on the paper UB-04 claim form, but this field is equivalent to
139
+ # Loop 2310E Service Facility Location details on an 837i form, and is used when
140
+ # this is different to the entity identified as the Billing Provider. Note that
141
+ # for an in-network claim to be successfully adjudicated, the service facility
142
+ # address listed
143
+ attr_reader :service_facility
144
+ # @return [CandidApiClient::Individual::Types::SubscriberCreate] Subscriber_primary is required when responsible_party is INSURANCE_PAY (i.e.
145
+ # when the claim should be billed to insurance).
146
+ # These are not required fields when responsible_party is SELF_PAY (i.e. when the
147
+ # claim should be billed to the patient).
148
+ # However, if you collect this for patients, even self-pay, we recommend including
149
+ # it when sending encounters to Candid.
150
+ # Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party
151
+ # to define self-pay claims.
152
+ attr_reader :subscriber_primary
153
+ # @return [CandidApiClient::Individual::Types::SubscriberCreate] Please always include this when you have it, even for self-pay claims.
154
+ attr_reader :subscriber_secondary
155
+ # @return [CandidApiClient::Individual::Types::SubscriberCreate] Please always include this when you have it, even for self-pay claims.
156
+ attr_reader :subscriber_tertiary
157
+ # @return [String] Box 23 on the CMS-1500 claim form or Form Locator 63 on a UB-04 claim form.
158
+ attr_reader :prior_authorization_number
159
+ # @return [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
160
+ attr_reader :responsible_party
161
+ # @return [Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>] Holds a collection of clinical observations made by healthcare providers during
162
+ # patient encounters. Please note that medical records for appeals should be sent
163
+ # using the Encounter Attachments API.
164
+ attr_reader :clinical_notes
165
+ # @return [Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>] Spot to store misc, human-readable, notes about this encounter to be used
166
+ # in the billing process.
167
+ attr_reader :billing_notes
168
+ # @return [Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>]
169
+ attr_reader :patient_histories
170
+ # @return [CandidApiClient::Guarantor::V1::Types::GuarantorCreate] Personal and contact info for the guarantor of the patient responsibility.
171
+ attr_reader :guarantor
172
+ # @return [CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate] To be included for claims that have been submitted outside of Candid.
173
+ # Candid supports posting remits and payments to these claims and working them
174
+ # in-platform (e.g. editing, resubmitting).
175
+ attr_reader :external_claim_submission
176
+ # @return [Array<String>] Names of tags that should be on the encounter.
177
+ attr_reader :tag_ids
178
+ # @return [Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
179
+ # Multiple schema
180
+ # instances cannot be created for the same schema on an encounter.
181
+ attr_reader :schema_instances
182
+ # @return [String] Refers to REF*9F on the 837p and 837i. Value cannot be greater than 50
183
+ # characters.
184
+ attr_reader :referral_number
185
+ # @return [CandidApiClient::Encounters::V4::Types::EpsdtReferral] Refers to Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
186
+ # 837P and 837i form
187
+ attr_reader :epsdt_referral
188
+ # @return [Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>] Refers to Loop 2300 - Segment PWK on the 837P and 837i forms. No more than 10
189
+ # entries are permitted.
190
+ attr_reader :claim_supplemental_information
191
+ # @return [String] When Medicaid is billed as the secondary payer the Carrier Code is used to
192
+ # identify the primary payer. This is required for certain states.
193
+ attr_reader :secondary_payer_carrier_code
194
+ # @return [String] A client-specified unique ID to associate with this encounter;
195
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
196
+ # This field should not contain PHI.
197
+ attr_reader :external_id
198
+ # @return [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
199
+ # This date must be the local date in the timezone where the service occurred.
200
+ # Box 24a on the CMS-1500 claim form or Form Locator 45 on the UB-04 claim form.
201
+ # If service occurred over a range of dates, this should be the start date.
202
+ # date_of_service must be defined on either the encounter or the service lines but
203
+ # not both.
204
+ # If there are greater than zero service lines, it is recommended to specify
205
+ # date_of_service on the service_line instead of on the encounter to prepare for
206
+ # future API versions.
207
+ attr_reader :date_of_service
208
+ # @return [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
209
+ # This date must be the local date in the timezone where the service occurred.
210
+ # If omitted, the Encounter is assumed to be for a single day.
211
+ # Must not be temporally before the date_of_service field.
212
+ # If there are greater than zero service lines, it is recommended to specify
213
+ # end_date_of_service on the service_line instead of on the encounter to prepare
214
+ # for future API versions.
215
+ attr_reader :end_date_of_service
216
+ # @return [Boolean] Whether this patient has authorized the release of medical information
217
+ # for billing purpose.
218
+ # Box 12 on the CMS-1500 claim form or Form Locator 52 on a UB-04 claim form.
219
+ attr_reader :patient_authorized_release
220
+ # @return [Boolean] Whether this patient has authorized insurance payments to be made to you,
221
+ # not them. If false, patient may receive reimbursement.
222
+ # Box 13 on the CMS-1500 claim form or Form Locator 53 on a UB-04 claim form.
223
+ attr_reader :benefits_assigned_to_provider
224
+ # @return [Boolean] Whether you have accepted the patient's authorization for insurance payments
225
+ # to be made to you, not them.
226
+ # Box 27 on the CMS-1500 claim form. There is no exact equivalent of this field on
227
+ # a UB-04 claim, however contributes to the concept of Form Locator 53.
228
+ attr_reader :provider_accepts_assignment
229
+ # @return [String] Human-readable description of the appointment type (ex: "Acupuncture -
230
+ # Headaches").
231
+ attr_reader :appointment_type
232
+ # @return [Array<CandidApiClient::Encounters::V4::Types::Medication>]
233
+ attr_reader :existing_medications
234
+ # @return [Array<CandidApiClient::Encounters::V4::Types::Intervention>]
235
+ attr_reader :interventions
236
+ # @return [CandidApiClient::Commons::Types::StreetAddressLongZip] Specifies the address to which payments for the claim should be sent.
237
+ attr_reader :pay_to_address
238
+ # @return [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
239
+ # Asynchronous encounters occur when providers and patients communicate online
240
+ # using
241
+ # forms, instant messaging, or other pre-recorded digital mediums.
242
+ # Synchronous encounters occur in live, real-time settings where the patient
243
+ # interacts
244
+ # directly with the provider, such as over video or a phone call.
245
+ attr_reader :synchronicity
246
+ # @return [CandidApiClient::Encounters::V4::Types::Vitals]
247
+ attr_reader :vitals
248
+ # @return [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
249
+ # Examples for when this should be set to NOT_BILLABLE include
250
+ # if the Encounter has not occurred yet or if there is no intention of ever
251
+ # billing the responsible_party.
252
+ attr_reader :billable_status
253
+ # @return [String] Defines additional information on the claim needed by the payer.
254
+ # Box 19 on the CMS-1500 claim form or Form Locator 80 on a UB-04 claim form.
255
+ attr_reader :additional_information
256
+ # @return [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
257
+ # Required when mandated by government law or regulation to obtain authorization
258
+ # for specific service(s) but, for the
259
+ # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
260
+ # the service was performed without
261
+ # obtaining the authorization.
262
+ attr_reader :service_authorization_exception_code
263
+ # @return [Date] 837p Loop2300 DTP*435, CMS-1500 Box 18 or UB-04 Form Locator 12.
264
+ # Required on all ambulance claims when the patient was known to be admitted to
265
+ # the hospital.
266
+ # OR
267
+ # Required on all claims involving inpatient medical visits.
268
+ attr_reader :admission_date
269
+ # @return [Date] 837p Loop2300 DTP*096, CMS-1500 Box 18 Required for inpatient claims when the
270
+ # patient was discharged from the facility and the discharge date is known. Not
271
+ # used on an institutional claim.
272
+ attr_reader :discharge_date
273
+ # @return [Date] 837p Loop2300 DTP*431, CMS-1500 Box 14
274
+ # Required for the initial medical service or visit performed in response to a
275
+ # medical emergency when the date is available and is different than the date of
276
+ # service.
277
+ # OR
278
+ # This date is the onset of acute symptoms for the current illness or condition.
279
+ # For UB-04 claims, this is populated separately via occurrence codes.
280
+ attr_reader :onset_of_current_illness_or_symptom_date
281
+ # @return [Date] 837p Loop2300 DTP*484, CMS-1500 Box 14
282
+ # Required when, in the judgment of the provider, the services on this claim are
283
+ # related to the patient's pregnancy.
284
+ # This field is populated separately via occurrence codes for UB-04 claim forms.
285
+ attr_reader :last_menstrual_period_date
286
+ # @return [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
287
+ # Code indicating the reason why a request was delayed
288
+ attr_reader :delay_reason_code
289
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
290
+ attr_reader :additional_properties
291
+ # @return [Object]
292
+ attr_reader :_field_set
293
+ protected :_field_set
294
+
295
+ OMIT = Object.new
296
+
297
+ # @param billing_provider [CandidApiClient::EncounterProviders::V2::Types::BillingProvider] The billing provider is the provider or business entity submitting the claim.
298
+ # Billing provider may be, but is not necessarily, the same person/NPI as the
299
+ # rendering provider. From a payer's perspective, this represents the person or
300
+ # entity being reimbursed. When a contract exists with the target payer, the
301
+ # billing provider should be the entity contracted with the payer. In some
302
+ # circumstances, this will be an individual provider. In that case, submit that
303
+ # provider's NPI and the tax ID (TIN) that the provider gave to the payer during
304
+ # contracting. In other cases, the billing entity will be a medical group. If so,
305
+ # submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim or
306
+ # Form Locator 1 on a UB-04 claim form.
307
+ # @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. This box is not
308
+ # used on a UB-04 or 837i claim form. 02 for telemedicine, 11 for in-person. Full
309
+ # list
310
+ # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
311
+ # @param rendering_provider [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] The rendering provider is the practitioner -- physician, nurse practitioner,
312
+ # etc. -- performing the service.
313
+ # For telehealth services, the rendering provider performs the visit, asynchronous
314
+ # communication, or other service. The rendering provider address should generally
315
+ # be the same as the service facility address.
316
+ # @param service_lines [Array<CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreate>]
317
+ # @param health_care_code_information [CandidApiClient::HealthCareCodeInformation::V1::Types::HealthCareCodeInformationCreate] The health care code information associated with this encounter, which includes
318
+ # things such as diagnoses, vitals, procedures, occurrences, reason for visit, and
319
+ # numerous other code related fields.
320
+ # @param submission_expectation [CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation] Describes the currently expected target form for this encounter. This can
321
+ # change later, but it orients this encounter in the pipeline and effects
322
+ # reporting.
323
+ # @param attending_provider [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
324
+ # has overall responsibility for the patient in institutional claims processing.
325
+ # @param admission_hour [Integer] 837i Loop 2300 DTP-03
326
+ # Extension of the admission date with hour (0-23 integer) details.
327
+ # @param admission_type_code [CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode] 837i Loop 2300 CL1-01 Code used to indicate the priority of an admission or
328
+ # visit. Equivalent to Form Locator 14 Priority of Admission on a UB-04 claim, not
329
+ # used on CMS-1500 claim forms.
330
+ # @param admission_source_code [CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode] 837i Loop 2300 CLI1-02 Code used to indicate the conditions under which an
331
+ # admission occurs. Equivalent to Form Locator 15 Point of Origin on a UB-04
332
+ # claim, not used on CMS-1500 claim forms.
333
+ # @param discharge_hour [Integer] 837i Loop 2300 DTP-03
334
+ # Extension of the discharge date with hour (0-23 integer) details.
335
+ # @param discharge_status [CandidApiClient::X12::V1::Types::PatientDischargeStatusCode] 837i CL1-03 or Form Locator 17 on a UB-04 claim form. This is a required field
336
+ # on UB-04 claims.
337
+ # Code indicating patient status as of the "statement covers through date" .
338
+ # @param operating_provider [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
339
+ # has primary responsibility for surgical procedures in institutional claims
340
+ # processing.
341
+ # @param other_operating_provider [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
342
+ # has secondary responsibility for surgical procedures in institutional claims
343
+ # processing. Only used when operating_provider is also set.
344
+ # @param type_of_bill [CandidApiClient::X12::V1::Types::TypeOfBillCompositeUpdate] Four digit code used in institutional forms to indicate the type of bill (e.g.,
345
+ # hospital inpatient, hospital outpatient). First digit is a leading 0, followed
346
+ # by the type_of_facility, type_of_care, then frequency_code. Professional forms
347
+ # are not required to submit this attribute. You may send the 4 digit code via
348
+ # raw_code, or each individual digit separately via composite_codes.
349
+ # @param accident_state_or_province_code [CandidApiClient::Commons::Types::State] 837i-REF1000 -- an optional state indicating where an accident related to the
350
+ # encounter occurred.
351
+ # @param patient [CandidApiClient::Individual::Types::PatientCreate] Contains the identification information of the individual receiving medical
352
+ # services.
353
+ # @param referring_provider [CandidApiClient::EncounterProviders::V2::Types::ReferringProvider] The final provider who referred the services that were rendered.
354
+ # All physicians who order services or refer Medicare beneficiaries must
355
+ # report this data.
356
+ # @param initial_referring_provider [CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider] The second iteration of Loop ID-2310 on an 837P form. Use code "P3 - Primary
357
+ # Care Provider" in this loop to
358
+ # indicate the initial referral from the primary care provider or whatever
359
+ # provider wrote the initial referral for this patient's episode of care being
360
+ # billed/reported in this transaction.
361
+ # Not used in an 837i claim
362
+ # @param supervising_provider [CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider] Required when the rendering provider is supervised by a physician. If not
363
+ # required by this implementation guide, do not send.
364
+ # @param service_facility [CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase] Encounter Service facility is typically the location a medical service was
365
+ # rendered, such as a provider office or hospital. For telehealth, service
366
+ # facility can represent the provider's location when the service was delivered
367
+ # (e.g., home), or the location where an in-person visit would have taken place,
368
+ # whichever is easier to identify. If the provider is in-network, service facility
369
+ # may be defined in payer contracts. Box 32 on the CMS-1500 claim form. There is
370
+ # no equivalent on the paper UB-04 claim form, but this field is equivalent to
371
+ # Loop 2310E Service Facility Location details on an 837i form, and is used when
372
+ # this is different to the entity identified as the Billing Provider. Note that
373
+ # for an in-network claim to be successfully adjudicated, the service facility
374
+ # address listed
375
+ # @param subscriber_primary [CandidApiClient::Individual::Types::SubscriberCreate] Subscriber_primary is required when responsible_party is INSURANCE_PAY (i.e.
376
+ # when the claim should be billed to insurance).
377
+ # These are not required fields when responsible_party is SELF_PAY (i.e. when the
378
+ # claim should be billed to the patient).
379
+ # However, if you collect this for patients, even self-pay, we recommend including
380
+ # it when sending encounters to Candid.
381
+ # Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party
382
+ # to define self-pay claims.
383
+ # @param subscriber_secondary [CandidApiClient::Individual::Types::SubscriberCreate] Please always include this when you have it, even for self-pay claims.
384
+ # @param subscriber_tertiary [CandidApiClient::Individual::Types::SubscriberCreate] Please always include this when you have it, even for self-pay claims.
385
+ # @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form or Form Locator 63 on a UB-04 claim form.
386
+ # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
387
+ # @param clinical_notes [Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>] Holds a collection of clinical observations made by healthcare providers during
388
+ # patient encounters. Please note that medical records for appeals should be sent
389
+ # using the Encounter Attachments API.
390
+ # @param billing_notes [Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>] Spot to store misc, human-readable, notes about this encounter to be used
391
+ # in the billing process.
392
+ # @param patient_histories [Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>]
393
+ # @param guarantor [CandidApiClient::Guarantor::V1::Types::GuarantorCreate] Personal and contact info for the guarantor of the patient responsibility.
394
+ # @param external_claim_submission [CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate] To be included for claims that have been submitted outside of Candid.
395
+ # Candid supports posting remits and payments to these claims and working them
396
+ # in-platform (e.g. editing, resubmitting).
397
+ # @param tag_ids [Array<String>] Names of tags that should be on the encounter.
398
+ # @param schema_instances [Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
399
+ # Multiple schema
400
+ # instances cannot be created for the same schema on an encounter.
401
+ # @param referral_number [String] Refers to REF*9F on the 837p and 837i. Value cannot be greater than 50
402
+ # characters.
403
+ # @param epsdt_referral [CandidApiClient::Encounters::V4::Types::EpsdtReferral] Refers to Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
404
+ # 837P and 837i form
405
+ # @param claim_supplemental_information [Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>] Refers to Loop 2300 - Segment PWK on the 837P and 837i forms. No more than 10
406
+ # entries are permitted.
407
+ # @param secondary_payer_carrier_code [String] When Medicaid is billed as the secondary payer the Carrier Code is used to
408
+ # identify the primary payer. This is required for certain states.
409
+ # @param external_id [String] A client-specified unique ID to associate with this encounter;
410
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
411
+ # This field should not contain PHI.
412
+ # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
413
+ # This date must be the local date in the timezone where the service occurred.
414
+ # Box 24a on the CMS-1500 claim form or Form Locator 45 on the UB-04 claim form.
415
+ # If service occurred over a range of dates, this should be the start date.
416
+ # date_of_service must be defined on either the encounter or the service lines but
417
+ # not both.
418
+ # If there are greater than zero service lines, it is recommended to specify
419
+ # date_of_service on the service_line instead of on the encounter to prepare for
420
+ # future API versions.
421
+ # @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
422
+ # This date must be the local date in the timezone where the service occurred.
423
+ # If omitted, the Encounter is assumed to be for a single day.
424
+ # Must not be temporally before the date_of_service field.
425
+ # If there are greater than zero service lines, it is recommended to specify
426
+ # end_date_of_service on the service_line instead of on the encounter to prepare
427
+ # for future API versions.
428
+ # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
429
+ # for billing purpose.
430
+ # Box 12 on the CMS-1500 claim form or Form Locator 52 on a UB-04 claim form.
431
+ # @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you,
432
+ # not them. If false, patient may receive reimbursement.
433
+ # Box 13 on the CMS-1500 claim form or Form Locator 53 on a UB-04 claim form.
434
+ # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
435
+ # to be made to you, not them.
436
+ # Box 27 on the CMS-1500 claim form. There is no exact equivalent of this field on
437
+ # a UB-04 claim, however contributes to the concept of Form Locator 53.
438
+ # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
439
+ # Headaches").
440
+ # @param existing_medications [Array<CandidApiClient::Encounters::V4::Types::Medication>]
441
+ # @param interventions [Array<CandidApiClient::Encounters::V4::Types::Intervention>]
442
+ # @param pay_to_address [CandidApiClient::Commons::Types::StreetAddressLongZip] Specifies the address to which payments for the claim should be sent.
443
+ # @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
444
+ # Asynchronous encounters occur when providers and patients communicate online
445
+ # using
446
+ # forms, instant messaging, or other pre-recorded digital mediums.
447
+ # Synchronous encounters occur in live, real-time settings where the patient
448
+ # interacts
449
+ # directly with the provider, such as over video or a phone call.
450
+ # @param vitals [CandidApiClient::Encounters::V4::Types::Vitals]
451
+ # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
452
+ # Examples for when this should be set to NOT_BILLABLE include
453
+ # if the Encounter has not occurred yet or if there is no intention of ever
454
+ # billing the responsible_party.
455
+ # @param additional_information [String] Defines additional information on the claim needed by the payer.
456
+ # Box 19 on the CMS-1500 claim form or Form Locator 80 on a UB-04 claim form.
457
+ # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
458
+ # Required when mandated by government law or regulation to obtain authorization
459
+ # for specific service(s) but, for the
460
+ # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
461
+ # the service was performed without
462
+ # obtaining the authorization.
463
+ # @param admission_date [Date] 837p Loop2300 DTP*435, CMS-1500 Box 18 or UB-04 Form Locator 12.
464
+ # Required on all ambulance claims when the patient was known to be admitted to
465
+ # the hospital.
466
+ # OR
467
+ # Required on all claims involving inpatient medical visits.
468
+ # @param discharge_date [Date] 837p Loop2300 DTP*096, CMS-1500 Box 18 Required for inpatient claims when the
469
+ # patient was discharged from the facility and the discharge date is known. Not
470
+ # used on an institutional claim.
471
+ # @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP*431, CMS-1500 Box 14
472
+ # Required for the initial medical service or visit performed in response to a
473
+ # medical emergency when the date is available and is different than the date of
474
+ # service.
475
+ # OR
476
+ # This date is the onset of acute symptoms for the current illness or condition.
477
+ # For UB-04 claims, this is populated separately via occurrence codes.
478
+ # @param last_menstrual_period_date [Date] 837p Loop2300 DTP*484, CMS-1500 Box 14
479
+ # Required when, in the judgment of the provider, the services on this claim are
480
+ # related to the patient's pregnancy.
481
+ # This field is populated separately via occurrence codes for UB-04 claim forms.
482
+ # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
483
+ # Code indicating the reason why a request was delayed
484
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
485
+ # @return [CandidApiClient::EncountersUniversal::Types::UniversalEncounterCreate]
486
+ def initialize(billing_provider:, submission_expectation:, patient:, responsible_party:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, place_of_service_code: OMIT, rendering_provider: OMIT, service_lines: OMIT,
487
+ health_care_code_information: OMIT, attending_provider: OMIT, admission_hour: OMIT, admission_type_code: OMIT, admission_source_code: OMIT, discharge_hour: OMIT, discharge_status: OMIT, operating_provider: OMIT, other_operating_provider: OMIT, type_of_bill: OMIT, accident_state_or_province_code: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, service_facility: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, subscriber_tertiary: OMIT, prior_authorization_number: OMIT, clinical_notes: OMIT, billing_notes: OMIT, patient_histories: OMIT, guarantor: OMIT, external_claim_submission: OMIT, tag_ids: OMIT, schema_instances: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, secondary_payer_carrier_code: 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)
488
+ @billing_provider = billing_provider
489
+ @place_of_service_code = place_of_service_code if place_of_service_code != OMIT
490
+ @rendering_provider = rendering_provider if rendering_provider != OMIT
491
+ @service_lines = service_lines if service_lines != OMIT
492
+ @health_care_code_information = health_care_code_information if health_care_code_information != OMIT
493
+ @submission_expectation = submission_expectation
494
+ @attending_provider = attending_provider if attending_provider != OMIT
495
+ @admission_hour = admission_hour if admission_hour != OMIT
496
+ @admission_type_code = admission_type_code if admission_type_code != OMIT
497
+ @admission_source_code = admission_source_code if admission_source_code != OMIT
498
+ @discharge_hour = discharge_hour if discharge_hour != OMIT
499
+ @discharge_status = discharge_status if discharge_status != OMIT
500
+ @operating_provider = operating_provider if operating_provider != OMIT
501
+ @other_operating_provider = other_operating_provider if other_operating_provider != OMIT
502
+ @type_of_bill = type_of_bill if type_of_bill != OMIT
503
+ @accident_state_or_province_code = accident_state_or_province_code if accident_state_or_province_code != OMIT
504
+ @patient = patient
505
+ @referring_provider = referring_provider if referring_provider != OMIT
506
+ @initial_referring_provider = initial_referring_provider if initial_referring_provider != OMIT
507
+ @supervising_provider = supervising_provider if supervising_provider != OMIT
508
+ @service_facility = service_facility if service_facility != OMIT
509
+ @subscriber_primary = subscriber_primary if subscriber_primary != OMIT
510
+ @subscriber_secondary = subscriber_secondary if subscriber_secondary != OMIT
511
+ @subscriber_tertiary = subscriber_tertiary if subscriber_tertiary != OMIT
512
+ @prior_authorization_number = prior_authorization_number if prior_authorization_number != OMIT
513
+ @responsible_party = responsible_party
514
+ @clinical_notes = clinical_notes if clinical_notes != OMIT
515
+ @billing_notes = billing_notes if billing_notes != OMIT
516
+ @patient_histories = patient_histories if patient_histories != OMIT
517
+ @guarantor = guarantor if guarantor != OMIT
518
+ @external_claim_submission = external_claim_submission if external_claim_submission != OMIT
519
+ @tag_ids = tag_ids if tag_ids != OMIT
520
+ @schema_instances = schema_instances if schema_instances != OMIT
521
+ @referral_number = referral_number if referral_number != OMIT
522
+ @epsdt_referral = epsdt_referral if epsdt_referral != OMIT
523
+ @claim_supplemental_information = claim_supplemental_information if claim_supplemental_information != OMIT
524
+ @secondary_payer_carrier_code = secondary_payer_carrier_code if secondary_payer_carrier_code != OMIT
525
+ @external_id = external_id
526
+ @date_of_service = date_of_service if date_of_service != OMIT
527
+ @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
528
+ @patient_authorized_release = patient_authorized_release
529
+ @benefits_assigned_to_provider = benefits_assigned_to_provider
530
+ @provider_accepts_assignment = provider_accepts_assignment
531
+ @appointment_type = appointment_type if appointment_type != OMIT
532
+ @existing_medications = existing_medications if existing_medications != OMIT
533
+ @interventions = interventions if interventions != OMIT
534
+ @pay_to_address = pay_to_address if pay_to_address != OMIT
535
+ @synchronicity = synchronicity if synchronicity != OMIT
536
+ @vitals = vitals if vitals != OMIT
537
+ @billable_status = billable_status
538
+ @additional_information = additional_information if additional_information != OMIT
539
+ if service_authorization_exception_code != OMIT
540
+ @service_authorization_exception_code = service_authorization_exception_code
541
+ end
542
+ @admission_date = admission_date if admission_date != OMIT
543
+ @discharge_date = discharge_date if discharge_date != OMIT
544
+ if onset_of_current_illness_or_symptom_date != OMIT
545
+ @onset_of_current_illness_or_symptom_date = onset_of_current_illness_or_symptom_date
546
+ end
547
+ @last_menstrual_period_date = last_menstrual_period_date if last_menstrual_period_date != OMIT
548
+ @delay_reason_code = delay_reason_code if delay_reason_code != OMIT
549
+ @additional_properties = additional_properties
550
+ @_field_set = {
551
+ "billing_provider": billing_provider,
552
+ "place_of_service_code": place_of_service_code,
553
+ "rendering_provider": rendering_provider,
554
+ "service_lines": service_lines,
555
+ "health_care_code_information": health_care_code_information,
556
+ "submission_expectation": submission_expectation,
557
+ "attending_provider": attending_provider,
558
+ "admission_hour": admission_hour,
559
+ "admission_type_code": admission_type_code,
560
+ "admission_source_code": admission_source_code,
561
+ "discharge_hour": discharge_hour,
562
+ "discharge_status": discharge_status,
563
+ "operating_provider": operating_provider,
564
+ "other_operating_provider": other_operating_provider,
565
+ "type_of_bill": type_of_bill,
566
+ "accident_state_or_province_code": accident_state_or_province_code,
567
+ "patient": patient,
568
+ "referring_provider": referring_provider,
569
+ "initial_referring_provider": initial_referring_provider,
570
+ "supervising_provider": supervising_provider,
571
+ "service_facility": service_facility,
572
+ "subscriber_primary": subscriber_primary,
573
+ "subscriber_secondary": subscriber_secondary,
574
+ "subscriber_tertiary": subscriber_tertiary,
575
+ "prior_authorization_number": prior_authorization_number,
576
+ "responsible_party": responsible_party,
577
+ "clinical_notes": clinical_notes,
578
+ "billing_notes": billing_notes,
579
+ "patient_histories": patient_histories,
580
+ "guarantor": guarantor,
581
+ "external_claim_submission": external_claim_submission,
582
+ "tag_ids": tag_ids,
583
+ "schema_instances": schema_instances,
584
+ "referral_number": referral_number,
585
+ "epsdt_referral": epsdt_referral,
586
+ "claim_supplemental_information": claim_supplemental_information,
587
+ "secondary_payer_carrier_code": secondary_payer_carrier_code,
588
+ "external_id": external_id,
589
+ "date_of_service": date_of_service,
590
+ "end_date_of_service": end_date_of_service,
591
+ "patient_authorized_release": patient_authorized_release,
592
+ "benefits_assigned_to_provider": benefits_assigned_to_provider,
593
+ "provider_accepts_assignment": provider_accepts_assignment,
594
+ "appointment_type": appointment_type,
595
+ "existing_medications": existing_medications,
596
+ "interventions": interventions,
597
+ "pay_to_address": pay_to_address,
598
+ "synchronicity": synchronicity,
599
+ "vitals": vitals,
600
+ "billable_status": billable_status,
601
+ "additional_information": additional_information,
602
+ "service_authorization_exception_code": service_authorization_exception_code,
603
+ "admission_date": admission_date,
604
+ "discharge_date": discharge_date,
605
+ "onset_of_current_illness_or_symptom_date": onset_of_current_illness_or_symptom_date,
606
+ "last_menstrual_period_date": last_menstrual_period_date,
607
+ "delay_reason_code": delay_reason_code
608
+ }.reject do |_k, v|
609
+ v == OMIT
610
+ end
611
+ end
612
+
613
+ # Deserialize a JSON object to an instance of UniversalEncounterCreate
614
+ #
615
+ # @param json_object [String]
616
+ # @return [CandidApiClient::EncountersUniversal::Types::UniversalEncounterCreate]
617
+ def self.from_json(json_object:)
618
+ struct = JSON.parse(json_object, object_class: OpenStruct)
619
+ parsed_json = JSON.parse(json_object)
620
+ if parsed_json["billing_provider"].nil?
621
+ billing_provider = nil
622
+ else
623
+ billing_provider = parsed_json["billing_provider"].to_json
624
+ billing_provider = CandidApiClient::EncounterProviders::V2::Types::BillingProvider.from_json(json_object: billing_provider)
625
+ end
626
+ place_of_service_code = struct["place_of_service_code"]
627
+ if parsed_json["rendering_provider"].nil?
628
+ rendering_provider = nil
629
+ else
630
+ rendering_provider = parsed_json["rendering_provider"].to_json
631
+ rendering_provider = CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.from_json(json_object: rendering_provider)
632
+ end
633
+ service_lines = parsed_json["service_lines"]&.map do |item|
634
+ item = item.to_json
635
+ CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreate.from_json(json_object: item)
636
+ end
637
+ if parsed_json["health_care_code_information"].nil?
638
+ health_care_code_information = nil
639
+ else
640
+ health_care_code_information = parsed_json["health_care_code_information"].to_json
641
+ health_care_code_information = CandidApiClient::HealthCareCodeInformation::V1::Types::HealthCareCodeInformationCreate.from_json(json_object: health_care_code_information)
642
+ end
643
+ submission_expectation = struct["submission_expectation"]
644
+ if parsed_json["attending_provider"].nil?
645
+ attending_provider = nil
646
+ else
647
+ attending_provider = parsed_json["attending_provider"].to_json
648
+ attending_provider = CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.from_json(json_object: attending_provider)
649
+ end
650
+ admission_hour = struct["admission_hour"]
651
+ admission_type_code = struct["admission_type_code"]
652
+ admission_source_code = struct["admission_source_code"]
653
+ discharge_hour = struct["discharge_hour"]
654
+ discharge_status = struct["discharge_status"]
655
+ if parsed_json["operating_provider"].nil?
656
+ operating_provider = nil
657
+ else
658
+ operating_provider = parsed_json["operating_provider"].to_json
659
+ operating_provider = CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.from_json(json_object: operating_provider)
660
+ end
661
+ if parsed_json["other_operating_provider"].nil?
662
+ other_operating_provider = nil
663
+ else
664
+ other_operating_provider = parsed_json["other_operating_provider"].to_json
665
+ other_operating_provider = CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.from_json(json_object: other_operating_provider)
666
+ end
667
+ if parsed_json["type_of_bill"].nil?
668
+ type_of_bill = nil
669
+ else
670
+ type_of_bill = parsed_json["type_of_bill"].to_json
671
+ type_of_bill = CandidApiClient::X12::V1::Types::TypeOfBillCompositeUpdate.from_json(json_object: type_of_bill)
672
+ end
673
+ accident_state_or_province_code = struct["accident_state_or_province_code"]
674
+ if parsed_json["patient"].nil?
675
+ patient = nil
676
+ else
677
+ patient = parsed_json["patient"].to_json
678
+ patient = CandidApiClient::Individual::Types::PatientCreate.from_json(json_object: patient)
679
+ end
680
+ if parsed_json["referring_provider"].nil?
681
+ referring_provider = nil
682
+ else
683
+ referring_provider = parsed_json["referring_provider"].to_json
684
+ referring_provider = CandidApiClient::EncounterProviders::V2::Types::ReferringProvider.from_json(json_object: referring_provider)
685
+ end
686
+ if parsed_json["initial_referring_provider"].nil?
687
+ initial_referring_provider = nil
688
+ else
689
+ initial_referring_provider = parsed_json["initial_referring_provider"].to_json
690
+ initial_referring_provider = CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider.from_json(json_object: initial_referring_provider)
691
+ end
692
+ if parsed_json["supervising_provider"].nil?
693
+ supervising_provider = nil
694
+ else
695
+ supervising_provider = parsed_json["supervising_provider"].to_json
696
+ supervising_provider = CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider.from_json(json_object: supervising_provider)
697
+ end
698
+ if parsed_json["service_facility"].nil?
699
+ service_facility = nil
700
+ else
701
+ service_facility = parsed_json["service_facility"].to_json
702
+ service_facility = CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase.from_json(json_object: service_facility)
703
+ end
704
+ if parsed_json["subscriber_primary"].nil?
705
+ subscriber_primary = nil
706
+ else
707
+ subscriber_primary = parsed_json["subscriber_primary"].to_json
708
+ subscriber_primary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_primary)
709
+ end
710
+ if parsed_json["subscriber_secondary"].nil?
711
+ subscriber_secondary = nil
712
+ else
713
+ subscriber_secondary = parsed_json["subscriber_secondary"].to_json
714
+ subscriber_secondary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_secondary)
715
+ end
716
+ if parsed_json["subscriber_tertiary"].nil?
717
+ subscriber_tertiary = nil
718
+ else
719
+ subscriber_tertiary = parsed_json["subscriber_tertiary"].to_json
720
+ subscriber_tertiary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_tertiary)
721
+ end
722
+ prior_authorization_number = struct["prior_authorization_number"]
723
+ responsible_party = struct["responsible_party"]
724
+ clinical_notes = parsed_json["clinical_notes"]&.map do |item|
725
+ item = item.to_json
726
+ CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate.from_json(json_object: item)
727
+ end
728
+ billing_notes = parsed_json["billing_notes"]&.map do |item|
729
+ item = item.to_json
730
+ CandidApiClient::BillingNotes::V2::Types::BillingNoteBase.from_json(json_object: item)
731
+ end
732
+ patient_histories = parsed_json["patient_histories"]&.map do |item|
733
+ item = item.to_json
734
+ CandidApiClient::Encounters::V4::Types::PatientHistoryCategory.from_json(json_object: item)
735
+ end
736
+ if parsed_json["guarantor"].nil?
737
+ guarantor = nil
738
+ else
739
+ guarantor = parsed_json["guarantor"].to_json
740
+ guarantor = CandidApiClient::Guarantor::V1::Types::GuarantorCreate.from_json(json_object: guarantor)
741
+ end
742
+ if parsed_json["external_claim_submission"].nil?
743
+ external_claim_submission = nil
744
+ else
745
+ external_claim_submission = parsed_json["external_claim_submission"].to_json
746
+ external_claim_submission = CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate.from_json(json_object: external_claim_submission)
747
+ end
748
+ tag_ids = struct["tag_ids"]
749
+ schema_instances = parsed_json["schema_instances"]&.map do |item|
750
+ item = item.to_json
751
+ CandidApiClient::CustomSchemas::V1::Types::SchemaInstance.from_json(json_object: item)
752
+ end
753
+ referral_number = struct["referral_number"]
754
+ if parsed_json["epsdt_referral"].nil?
755
+ epsdt_referral = nil
756
+ else
757
+ epsdt_referral = parsed_json["epsdt_referral"].to_json
758
+ epsdt_referral = CandidApiClient::Encounters::V4::Types::EpsdtReferral.from_json(json_object: epsdt_referral)
759
+ end
760
+ claim_supplemental_information = parsed_json["claim_supplemental_information"]&.map do |item|
761
+ item = item.to_json
762
+ CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation.from_json(json_object: item)
763
+ end
764
+ secondary_payer_carrier_code = struct["secondary_payer_carrier_code"]
765
+ external_id = struct["external_id"]
766
+ date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
767
+ end_date_of_service = unless parsed_json["end_date_of_service"].nil?
768
+ Date.parse(parsed_json["end_date_of_service"])
769
+ end
770
+ patient_authorized_release = struct["patient_authorized_release"]
771
+ benefits_assigned_to_provider = struct["benefits_assigned_to_provider"]
772
+ provider_accepts_assignment = struct["provider_accepts_assignment"]
773
+ appointment_type = struct["appointment_type"]
774
+ existing_medications = parsed_json["existing_medications"]&.map do |item|
775
+ item = item.to_json
776
+ CandidApiClient::Encounters::V4::Types::Medication.from_json(json_object: item)
777
+ end
778
+ interventions = parsed_json["interventions"]&.map do |item|
779
+ item = item.to_json
780
+ CandidApiClient::Encounters::V4::Types::Intervention.from_json(json_object: item)
781
+ end
782
+ if parsed_json["pay_to_address"].nil?
783
+ pay_to_address = nil
784
+ else
785
+ pay_to_address = parsed_json["pay_to_address"].to_json
786
+ pay_to_address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: pay_to_address)
787
+ end
788
+ synchronicity = struct["synchronicity"]
789
+ if parsed_json["vitals"].nil?
790
+ vitals = nil
791
+ else
792
+ vitals = parsed_json["vitals"].to_json
793
+ vitals = CandidApiClient::Encounters::V4::Types::Vitals.from_json(json_object: vitals)
794
+ end
795
+ billable_status = struct["billable_status"]
796
+ additional_information = struct["additional_information"]
797
+ service_authorization_exception_code = struct["service_authorization_exception_code"]
798
+ admission_date = (Date.parse(parsed_json["admission_date"]) unless parsed_json["admission_date"].nil?)
799
+ discharge_date = (Date.parse(parsed_json["discharge_date"]) unless parsed_json["discharge_date"].nil?)
800
+ onset_of_current_illness_or_symptom_date = unless parsed_json["onset_of_current_illness_or_symptom_date"].nil?
801
+ Date.parse(parsed_json["onset_of_current_illness_or_symptom_date"])
802
+ end
803
+ last_menstrual_period_date = unless parsed_json["last_menstrual_period_date"].nil?
804
+ Date.parse(parsed_json["last_menstrual_period_date"])
805
+ end
806
+ delay_reason_code = struct["delay_reason_code"]
807
+ new(
808
+ billing_provider: billing_provider,
809
+ place_of_service_code: place_of_service_code,
810
+ rendering_provider: rendering_provider,
811
+ service_lines: service_lines,
812
+ health_care_code_information: health_care_code_information,
813
+ submission_expectation: submission_expectation,
814
+ attending_provider: attending_provider,
815
+ admission_hour: admission_hour,
816
+ admission_type_code: admission_type_code,
817
+ admission_source_code: admission_source_code,
818
+ discharge_hour: discharge_hour,
819
+ discharge_status: discharge_status,
820
+ operating_provider: operating_provider,
821
+ other_operating_provider: other_operating_provider,
822
+ type_of_bill: type_of_bill,
823
+ accident_state_or_province_code: accident_state_or_province_code,
824
+ patient: patient,
825
+ referring_provider: referring_provider,
826
+ initial_referring_provider: initial_referring_provider,
827
+ supervising_provider: supervising_provider,
828
+ service_facility: service_facility,
829
+ subscriber_primary: subscriber_primary,
830
+ subscriber_secondary: subscriber_secondary,
831
+ subscriber_tertiary: subscriber_tertiary,
832
+ prior_authorization_number: prior_authorization_number,
833
+ responsible_party: responsible_party,
834
+ clinical_notes: clinical_notes,
835
+ billing_notes: billing_notes,
836
+ patient_histories: patient_histories,
837
+ guarantor: guarantor,
838
+ external_claim_submission: external_claim_submission,
839
+ tag_ids: tag_ids,
840
+ schema_instances: schema_instances,
841
+ referral_number: referral_number,
842
+ epsdt_referral: epsdt_referral,
843
+ claim_supplemental_information: claim_supplemental_information,
844
+ secondary_payer_carrier_code: secondary_payer_carrier_code,
845
+ external_id: external_id,
846
+ date_of_service: date_of_service,
847
+ end_date_of_service: end_date_of_service,
848
+ patient_authorized_release: patient_authorized_release,
849
+ benefits_assigned_to_provider: benefits_assigned_to_provider,
850
+ provider_accepts_assignment: provider_accepts_assignment,
851
+ appointment_type: appointment_type,
852
+ existing_medications: existing_medications,
853
+ interventions: interventions,
854
+ pay_to_address: pay_to_address,
855
+ synchronicity: synchronicity,
856
+ vitals: vitals,
857
+ billable_status: billable_status,
858
+ additional_information: additional_information,
859
+ service_authorization_exception_code: service_authorization_exception_code,
860
+ admission_date: admission_date,
861
+ discharge_date: discharge_date,
862
+ onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
863
+ last_menstrual_period_date: last_menstrual_period_date,
864
+ delay_reason_code: delay_reason_code,
865
+ additional_properties: struct
866
+ )
867
+ end
868
+
869
+ # Serialize an instance of UniversalEncounterCreate to a JSON object
870
+ #
871
+ # @return [String]
872
+ def to_json(*_args)
873
+ @_field_set&.to_json
874
+ end
875
+
876
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
877
+ # hash and check each fields type against the current object's property
878
+ # definitions.
879
+ #
880
+ # @param obj [Object]
881
+ # @return [Void]
882
+ def self.validate_raw(obj:)
883
+ CandidApiClient::EncounterProviders::V2::Types::BillingProvider.validate_raw(obj: obj.billing_provider)
884
+ obj.place_of_service_code&.is_a?(CandidApiClient::Commons::Types::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code is not the expected type, validation failed.")
885
+ obj.rendering_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.validate_raw(obj: obj.rendering_provider)
886
+ obj.service_lines&.is_a?(Array) != false || raise("Passed value for field obj.service_lines is not the expected type, validation failed.")
887
+ obj.health_care_code_information.nil? || CandidApiClient::HealthCareCodeInformation::V1::Types::HealthCareCodeInformationCreate.validate_raw(obj: obj.health_care_code_information)
888
+ obj.submission_expectation.is_a?(CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation) != false || raise("Passed value for field obj.submission_expectation is not the expected type, validation failed.")
889
+ obj.attending_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.validate_raw(obj: obj.attending_provider)
890
+ obj.admission_hour&.is_a?(Integer) != false || raise("Passed value for field obj.admission_hour is not the expected type, validation failed.")
891
+ obj.admission_type_code&.is_a?(CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode) != false || raise("Passed value for field obj.admission_type_code is not the expected type, validation failed.")
892
+ obj.admission_source_code&.is_a?(CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode) != false || raise("Passed value for field obj.admission_source_code is not the expected type, validation failed.")
893
+ obj.discharge_hour&.is_a?(Integer) != false || raise("Passed value for field obj.discharge_hour is not the expected type, validation failed.")
894
+ obj.discharge_status&.is_a?(CandidApiClient::X12::V1::Types::PatientDischargeStatusCode) != false || raise("Passed value for field obj.discharge_status is not the expected type, validation failed.")
895
+ obj.operating_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.validate_raw(obj: obj.operating_provider)
896
+ obj.other_operating_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.validate_raw(obj: obj.other_operating_provider)
897
+ obj.type_of_bill.nil? || CandidApiClient::X12::V1::Types::TypeOfBillCompositeUpdate.validate_raw(obj: obj.type_of_bill)
898
+ obj.accident_state_or_province_code&.is_a?(CandidApiClient::Commons::Types::State) != false || raise("Passed value for field obj.accident_state_or_province_code is not the expected type, validation failed.")
899
+ CandidApiClient::Individual::Types::PatientCreate.validate_raw(obj: obj.patient)
900
+ obj.referring_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::ReferringProvider.validate_raw(obj: obj.referring_provider)
901
+ obj.initial_referring_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider.validate_raw(obj: obj.initial_referring_provider)
902
+ obj.supervising_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider.validate_raw(obj: obj.supervising_provider)
903
+ obj.service_facility.nil? || CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase.validate_raw(obj: obj.service_facility)
904
+ obj.subscriber_primary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_primary)
905
+ obj.subscriber_secondary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_secondary)
906
+ obj.subscriber_tertiary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_tertiary)
907
+ obj.prior_authorization_number&.is_a?(String) != false || raise("Passed value for field obj.prior_authorization_number is not the expected type, validation failed.")
908
+ obj.responsible_party.is_a?(CandidApiClient::Encounters::V4::Types::ResponsiblePartyType) != false || raise("Passed value for field obj.responsible_party is not the expected type, validation failed.")
909
+ obj.clinical_notes&.is_a?(Array) != false || raise("Passed value for field obj.clinical_notes is not the expected type, validation failed.")
910
+ obj.billing_notes&.is_a?(Array) != false || raise("Passed value for field obj.billing_notes is not the expected type, validation failed.")
911
+ obj.patient_histories&.is_a?(Array) != false || raise("Passed value for field obj.patient_histories is not the expected type, validation failed.")
912
+ obj.guarantor.nil? || CandidApiClient::Guarantor::V1::Types::GuarantorCreate.validate_raw(obj: obj.guarantor)
913
+ obj.external_claim_submission.nil? || CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate.validate_raw(obj: obj.external_claim_submission)
914
+ obj.tag_ids&.is_a?(Array) != false || raise("Passed value for field obj.tag_ids is not the expected type, validation failed.")
915
+ obj.schema_instances&.is_a?(Array) != false || raise("Passed value for field obj.schema_instances is not the expected type, validation failed.")
916
+ obj.referral_number&.is_a?(String) != false || raise("Passed value for field obj.referral_number is not the expected type, validation failed.")
917
+ obj.epsdt_referral.nil? || CandidApiClient::Encounters::V4::Types::EpsdtReferral.validate_raw(obj: obj.epsdt_referral)
918
+ obj.claim_supplemental_information&.is_a?(Array) != false || raise("Passed value for field obj.claim_supplemental_information is not the expected type, validation failed.")
919
+ obj.secondary_payer_carrier_code&.is_a?(String) != false || raise("Passed value for field obj.secondary_payer_carrier_code is not the expected type, validation failed.")
920
+ obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
921
+ obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
922
+ 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.")
923
+ obj.patient_authorized_release.is_a?(Boolean) != false || raise("Passed value for field obj.patient_authorized_release is not the expected type, validation failed.")
924
+ 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.")
925
+ obj.provider_accepts_assignment.is_a?(Boolean) != false || raise("Passed value for field obj.provider_accepts_assignment is not the expected type, validation failed.")
926
+ obj.appointment_type&.is_a?(String) != false || raise("Passed value for field obj.appointment_type is not the expected type, validation failed.")
927
+ obj.existing_medications&.is_a?(Array) != false || raise("Passed value for field obj.existing_medications is not the expected type, validation failed.")
928
+ obj.interventions&.is_a?(Array) != false || raise("Passed value for field obj.interventions is not the expected type, validation failed.")
929
+ obj.pay_to_address.nil? || CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.pay_to_address)
930
+ obj.synchronicity&.is_a?(CandidApiClient::Encounters::V4::Types::SynchronicityType) != false || raise("Passed value for field obj.synchronicity is not the expected type, validation failed.")
931
+ obj.vitals.nil? || CandidApiClient::Encounters::V4::Types::Vitals.validate_raw(obj: obj.vitals)
932
+ 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.")
933
+ obj.additional_information&.is_a?(String) != false || raise("Passed value for field obj.additional_information is not the expected type, validation failed.")
934
+ 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.")
935
+ obj.admission_date&.is_a?(Date) != false || raise("Passed value for field obj.admission_date is not the expected type, validation failed.")
936
+ obj.discharge_date&.is_a?(Date) != false || raise("Passed value for field obj.discharge_date is not the expected type, validation failed.")
937
+ 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.")
938
+ 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.")
939
+ 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.")
940
+ end
941
+ end
942
+ end
943
+ end
944
+ end