candidhealth 1.8.0 → 1.9.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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +0 -74
  3. data/lib/candidhealth/charge_capture/v_1/client.rb +71 -4
  4. data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +33 -2
  5. data/lib/candidhealth/diagnoses/client.rb +2 -2
  6. data/lib/candidhealth/encounters/v_4/client.rb +483 -2510
  7. data/lib/candidhealth/encounters/v_4/types/encounter_submission_expectation.rb +3 -6
  8. data/lib/candidhealth/guarantor/v_1/client.rb +4 -0
  9. data/lib/candidhealth/guarantor/v_1/types/guarantor.rb +10 -2
  10. data/lib/candidhealth/guarantor/v_1/types/guarantor_create.rb +10 -2
  11. data/lib/candidhealth/guarantor/v_1/types/guarantor_optional.rb +10 -2
  12. data/lib/candidhealth/guarantor/v_1/types/guarantor_update.rb +10 -2
  13. data/lib/candidhealth/health_care_code_information/v_1/client.rb +2 -74
  14. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +2 -130
  15. data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +100 -1
  16. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +2 -130
  17. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +2 -130
  18. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +2 -130
  19. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +2 -134
  20. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +34 -34
  21. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +4 -139
  22. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +138 -38
  23. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +1 -0
  24. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +10 -132
  25. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +6 -1
  26. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +2 -130
  27. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +2 -130
  28. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +10 -132
  29. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +2 -130
  30. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +2 -130
  31. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +10 -132
  32. data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +16 -4
  33. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +2 -130
  34. data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +2 -130
  35. data/lib/candidhealth/individual/types/patient.rb +10 -2
  36. data/lib/candidhealth/individual/types/patient_create.rb +9 -1
  37. data/lib/candidhealth/individual/types/patient_update.rb +9 -1
  38. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +9 -1
  39. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
  40. data/lib/candidhealth/organization_service_facilities/v_2/client.rb +77 -4
  41. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility.rb +21 -2
  42. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_create.rb +21 -2
  43. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_update.rb +21 -2
  44. data/lib/candidhealth/payers/v_4/types/clearinghouse_payer_info.rb +36 -2
  45. data/lib/candidhealth/payers/v_4/types/payer.rb +15 -7
  46. data/lib/candidhealth/payers/v_4/types/payer_ids.rb +12 -35
  47. data/lib/candidhealth/payers/v_4/types/primary_payer_ids.rb +84 -0
  48. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +8 -2
  49. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +13 -1
  50. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +13 -1
  51. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +13 -1
  52. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient_service_facility.rb +63 -0
  53. data/lib/candidhealth/service_lines/v_2/client.rb +2 -2
  54. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +8 -8
  55. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +8 -8
  56. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +8 -8
  57. data/lib/requests.rb +2 -2
  58. data/lib/types_export.rb +2 -21
  59. metadata +4 -23
  60. data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +0 -944
  61. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +0 -791
  62. data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +0 -872
  63. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +0 -206
  64. data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +0 -1068
  65. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +0 -207
  66. data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +0 -54
  67. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +0 -206
  68. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +0 -245
  69. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +0 -225
  70. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +0 -219
  71. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +0 -222
  72. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +0 -215
  73. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +0 -218
  74. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +0 -206
  75. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +0 -215
  76. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +0 -216
  77. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +0 -206
  78. data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +0 -215
  79. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +0 -271
  80. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +0 -112
@@ -9,11 +9,8 @@ require_relative "types/responsible_party_type"
9
9
  require_relative "types/encounter_owner_of_next_action_type"
10
10
  require_relative "types/encounter_page"
11
11
  require_relative "types/encounter"
12
- require_relative "../../encounters_universal/types/universal_encounter_create"
13
12
  require_relative "types/encounter_create"
14
- require_relative "../../encounters_universal/types/universal_encounter_create_from_pre_encounter"
15
13
  require_relative "types/encounter_create_from_pre_encounter"
16
- require_relative "../../encounters_universal/types/universal_encounter_update"
17
14
  require_relative "types/encounter_update"
18
15
  require "async"
19
16
 
@@ -127,7 +124,7 @@ module CandidApiClient
127
124
  CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
128
125
  end
129
126
 
130
- # @param request [Hash] Request of type CandidApiClient::EncountersUniversal::Types::UniversalEncounterCreate, as a Hash
127
+ # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreate, as a Hash
131
128
  # * :billing_provider (Hash)
132
129
  # * :address (Hash)
133
130
  # * :zip_plus_four_code (String)
@@ -143,6 +140,7 @@ module CandidApiClient
143
140
  # * :first_name (String)
144
141
  # * :last_name (String)
145
142
  # * :organization_name (String)
143
+ # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
146
144
  # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
147
145
  # * :rendering_provider (Hash)
148
146
  # * :npi (String)
@@ -157,114 +155,7 @@ module CandidApiClient
157
155
  # * :first_name (String)
158
156
  # * :last_name (String)
159
157
  # * :organization_name (String)
160
- # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreate>)
161
- # * :health_care_code_information (Hash)
162
- # * :principal_diagnosis (Hash)
163
- # * :principal_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisCodeQualifier)
164
- # * :primary_diagnosis_code (String)
165
- # * :present_on_admission_indicator (CandidApiClient::HealthCareCodeInformation::V1::Types::PresentOnAdmissionIndicatorCode)
166
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
167
- # * :industry_code_1 (String)
168
- # * :industry_code_2 (String)
169
- # * :industry_code_3 (String)
170
- # * :industry_code_4 (String)
171
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
172
- # * :date_time_period (String)
173
- # * :monetary_amount (String)
174
- # * :quantity (String)
175
- # * :admitting_diagnosis (Hash)
176
- # * :admitting_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisCodeQualifier)
177
- # * :admitting_diagnosis_code (String)
178
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
179
- # * :industry_code_1 (String)
180
- # * :industry_code_2 (String)
181
- # * :industry_code_3 (String)
182
- # * :industry_code_4 (String)
183
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
184
- # * :date_time_period (String)
185
- # * :monetary_amount (String)
186
- # * :quantity (String)
187
- # * :patient_reasons_for_visit (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitNew>)
188
- # * :external_causes_of_injury (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ExternalCauseOfInjuryNew>)
189
- # * :diagnosis_related_groups (Hash)
190
- # * :diagnosis_related_group_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupCodeQualifier)
191
- # * :diagnosis_related_group_code (String)
192
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
193
- # * :industry_code_1 (String)
194
- # * :industry_code_2 (String)
195
- # * :industry_code_3 (String)
196
- # * :industry_code_4 (String)
197
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
198
- # * :date_time_period (String)
199
- # * :monetary_amount (String)
200
- # * :quantity (String)
201
- # * :other_diagnosis_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherDiagnosisInformationNew>)
202
- # * :principal_procedure (Hash)
203
- # * :principal_procedure_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationCodeQualifier)
204
- # * :principal_procedure_code (String)
205
- # * :procedure_date (DateTime)
206
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
207
- # * :industry_code_1 (String)
208
- # * :industry_code_2 (String)
209
- # * :industry_code_3 (String)
210
- # * :industry_code_4 (String)
211
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
212
- # * :date_time_period (String)
213
- # * :monetary_amount (String)
214
- # * :quantity (String)
215
- # * :other_procedure_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationNew>)
216
- # * :occurrence_span_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformationNew>)
217
- # * :occurrence_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationNew>)
218
- # * :treatment_code_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::TreatmentCodeInformationNew>)
219
- # * :value_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ValueInformationNew>)
220
- # * :condition_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ConditionInformationNew>)
221
- # * :submission_expectation (CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation)
222
- # * :attending_provider (Hash)
223
- # * :npi (String)
224
- # * :taxonomy_code (String)
225
- # * :address (Hash)
226
- # * :zip_plus_four_code (String)
227
- # * :address_1 (String)
228
- # * :address_2 (String)
229
- # * :city (String)
230
- # * :state (CandidApiClient::Commons::Types::State)
231
- # * :zip_code (String)
232
- # * :first_name (String)
233
- # * :last_name (String)
234
- # * :organization_name (String)
235
- # * :admission_hour (Integer)
236
- # * :admission_type_code (CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode)
237
- # * :admission_source_code (CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode)
238
- # * :discharge_hour (Integer)
239
- # * :discharge_status (CandidApiClient::X12::V1::Types::PatientDischargeStatusCode)
240
- # * :operating_provider (Hash)
241
- # * :npi (String)
242
- # * :taxonomy_code (String)
243
- # * :address (Hash)
244
- # * :zip_plus_four_code (String)
245
- # * :address_1 (String)
246
- # * :address_2 (String)
247
- # * :city (String)
248
- # * :state (CandidApiClient::Commons::Types::State)
249
- # * :zip_code (String)
250
- # * :first_name (String)
251
- # * :last_name (String)
252
- # * :organization_name (String)
253
- # * :other_operating_provider (Hash)
254
- # * :npi (String)
255
- # * :taxonomy_code (String)
256
- # * :address (Hash)
257
- # * :zip_plus_four_code (String)
258
- # * :address_1 (String)
259
- # * :address_2 (String)
260
- # * :city (String)
261
- # * :state (CandidApiClient::Commons::Types::State)
262
- # * :zip_code (String)
263
- # * :first_name (String)
264
- # * :last_name (String)
265
- # * :organization_name (String)
266
- # * :type_of_bill (Hash)
267
- # * :accident_state_or_province_code (CandidApiClient::Commons::Types::State)
158
+ # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
268
159
  # * :patient (Hash)
269
160
  # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
270
161
  # * :phone_consent (Boolean)
@@ -272,6 +163,7 @@ module CandidApiClient
272
163
  # * :non_insurance_payers (Array<String>)
273
164
  # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
274
165
  # * :email_consent (Boolean)
166
+ # * :auto_charge_consent (Boolean)
275
167
  # * :external_id (String)
276
168
  # * :date_of_birth (Date)
277
169
  # * :address (Hash)
@@ -426,6 +318,7 @@ module CandidApiClient
426
318
  # * :phone_consent (Boolean)
427
319
  # * :email (String)
428
320
  # * :email_consent (Boolean)
321
+ # * :auto_charge_consent (Boolean)
429
322
  # * :first_name (String)
430
323
  # * :last_name (String)
431
324
  # * :external_id (String)
@@ -487,8 +380,8 @@ module CandidApiClient
487
380
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
488
381
  # @example
489
382
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
490
- # api.encounters.v_4.create_universal(request: { external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE, patient: { first_name: "first_name", last_name: "last_name", gender: MALE, external_id: "external_id", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code" } }, responsible_party: INSURANCE_PAY, billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" }, submission_expectation: TARGET_PROFESSIONAL })
491
- def create_universal(request:, request_options: nil)
383
+ # api.encounters.v_4.create(request: { billing_provider: { address: { zip_plus_four_code: "zip_plus_four_code", address_1: "address1", city: "city", state: AA, zip_code: "zip_code" }, tax_id: "tax_id", npi: "npi" }, diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }], place_of_service_code: PHARMACY, rendering_provider: { npi: "npi" }, patient: { external_id: "external_id", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code" }, first_name: "first_name", last_name: "last_name", gender: MALE }, responsible_party: INSURANCE_PAY, external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE })
384
+ def create(request:, request_options: nil)
492
385
  response = @request_client.conn.post do |req|
493
386
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
494
387
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -499,29 +392,32 @@ module CandidApiClient
499
392
  }.compact
500
393
  req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
501
394
  req.url "#{@request_client.get_url(environment: CandidApi,
502
- request_options: request_options)}/api/encounters/v4/universal"
395
+ request_options: request_options)}/api/encounters/v4"
503
396
  end
504
397
  CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
505
398
  end
506
399
 
507
- # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreate, as a Hash
508
- # * :billing_provider (Hash)
509
- # * :address (Hash)
510
- # * :zip_plus_four_code (String)
511
- # * :address_1 (String)
512
- # * :address_2 (String)
513
- # * :city (String)
514
- # * :state (CandidApiClient::Commons::Types::State)
515
- # * :zip_code (String)
516
- # * :tax_id (String)
517
- # * :npi (String)
518
- # * :taxonomy_code (String)
519
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
520
- # * :first_name (String)
521
- # * :last_name (String)
522
- # * :organization_name (String)
523
- # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
524
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
400
+ # Create an encounter from a pre-encounter patient and appointment. This endpoint
401
+ # is intended to be used by consumers who are managing
402
+ # patients and appointments in the pre-encounter service and is currently under
403
+ # development. Consumers who are not taking advantage
404
+ # of the pre-encounter service should use the standard create endpoint.
405
+ # The endpoint will create an encounter from the provided fields, pulling
406
+ # information from the provided patient and appointment objects
407
+ # where applicable. In particular, the following fields are populated from the
408
+ # patient and appointment objects:
409
+ # - Patient
410
+ # - Referring Provider
411
+ # - Subscriber Primary
412
+ # - Subscriber Secondary
413
+ # - Referral Number
414
+ # - Responsible Party
415
+ # - Guarantor
416
+ # Utilizing this endpoint opts you into automatic updating of the encounter when
417
+ # the patient or appointment is updated, assuming the
418
+ # encounter has not already been submitted or adjudicated.
419
+ #
420
+ # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreateFromPreEncounter, as a Hash
525
421
  # * :rendering_provider (Hash)
526
422
  # * :npi (String)
527
423
  # * :taxonomy_code (String)
@@ -535,16 +431,12 @@ module CandidApiClient
535
431
  # * :first_name (String)
536
432
  # * :last_name (String)
537
433
  # * :organization_name (String)
434
+ # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
435
+ # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
538
436
  # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
539
- # * :patient (Hash)
540
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
541
- # * :phone_consent (Boolean)
542
- # * :email (String)
543
- # * :non_insurance_payers (Array<String>)
544
- # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
545
- # * :email_consent (Boolean)
546
- # * :external_id (String)
547
- # * :date_of_birth (Date)
437
+ # * :pre_encounter_patient_id (String)
438
+ # * :pre_encounter_appointment_ids (Array<String>)
439
+ # * :billing_provider (Hash)
548
440
  # * :address (Hash)
549
441
  # * :zip_plus_four_code (String)
550
442
  # * :address_1 (String)
@@ -552,19 +444,10 @@ module CandidApiClient
552
444
  # * :city (String)
553
445
  # * :state (CandidApiClient::Commons::Types::State)
554
446
  # * :zip_code (String)
555
- # * :first_name (String)
556
- # * :last_name (String)
557
- # * :gender (CandidApiClient::Individual::Types::Gender)
558
- # * :referring_provider (Hash)
447
+ # * :tax_id (String)
559
448
  # * :npi (String)
560
449
  # * :taxonomy_code (String)
561
- # * :address (Hash)
562
- # * :zip_plus_four_code (String)
563
- # * :address_1 (String)
564
- # * :address_2 (String)
565
- # * :city (String)
566
- # * :state (CandidApiClient::Commons::Types::State)
567
- # * :zip_code (String)
450
+ # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
568
451
  # * :first_name (String)
569
452
  # * :last_name (String)
570
453
  # * :organization_name (String)
@@ -606,6 +489,105 @@ module CandidApiClient
606
489
  # * :state (CandidApiClient::Commons::Types::State)
607
490
  # * :zip_code (String)
608
491
  # * :secondary_identification (String)
492
+ # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
493
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
494
+ # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
495
+ # * :external_claim_submission (Hash)
496
+ # * :claim_created_at (DateTime)
497
+ # * :patient_control_number (String)
498
+ # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
499
+ # * :tag_ids (Array<String>)
500
+ # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
501
+ # * :external_id (String)
502
+ # * :date_of_service (Date)
503
+ # * :end_date_of_service (Date)
504
+ # * :patient_authorized_release (Boolean)
505
+ # * :benefits_assigned_to_provider (Boolean)
506
+ # * :provider_accepts_assignment (Boolean)
507
+ # * :appointment_type (String)
508
+ # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
509
+ # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
510
+ # * :pay_to_address (Hash)
511
+ # * :zip_plus_four_code (String)
512
+ # * :address_1 (String)
513
+ # * :address_2 (String)
514
+ # * :city (String)
515
+ # * :state (CandidApiClient::Commons::Types::State)
516
+ # * :zip_code (String)
517
+ # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
518
+ # * :vitals (Hash)
519
+ # * :height_in (Integer)
520
+ # * :weight_lbs (Integer)
521
+ # * :blood_pressure_systolic_mmhg (Integer)
522
+ # * :blood_pressure_diastolic_mmhg (Integer)
523
+ # * :body_temperature_f (Float)
524
+ # * :hemoglobin_gdl (Float)
525
+ # * :hematocrit_pct (Float)
526
+ # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
527
+ # * :additional_information (String)
528
+ # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
529
+ # * :admission_date (Date)
530
+ # * :discharge_date (Date)
531
+ # * :onset_of_current_illness_or_symptom_date (Date)
532
+ # * :last_menstrual_period_date (Date)
533
+ # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
534
+ # @param request_options [CandidApiClient::RequestOptions]
535
+ # @return [CandidApiClient::Encounters::V4::Types::Encounter]
536
+ # @example
537
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
538
+ # api.encounters.v_4.create_from_pre_encounter_patient(request: { rendering_provider: { npi: "npi" }, place_of_service_code: PHARMACY, diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }], pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], billing_provider: { address: { zip_plus_four_code: "zip_plus_four_code", address_1: "address1", city: "city", state: AA, zip_code: "zip_code" }, tax_id: "tax_id", npi: "npi" }, external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE })
539
+ def create_from_pre_encounter_patient(request:, request_options: nil)
540
+ response = @request_client.conn.post do |req|
541
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
542
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
543
+ req.headers = {
544
+ **(req.headers || {}),
545
+ **@request_client.get_headers,
546
+ **(request_options&.additional_headers || {})
547
+ }.compact
548
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
549
+ req.url "#{@request_client.get_url(environment: CandidApi,
550
+ request_options: request_options)}/api/encounters/v4/create-from-pre-encounter"
551
+ end
552
+ CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
553
+ end
554
+
555
+ # @param encounter_id [String]
556
+ # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterUpdate, as a Hash
557
+ # * :vitals (Hash)
558
+ # * :height_in (Integer)
559
+ # * :weight_lbs (Integer)
560
+ # * :blood_pressure_systolic_mmhg (Integer)
561
+ # * :blood_pressure_diastolic_mmhg (Integer)
562
+ # * :body_temperature_f (Float)
563
+ # * :hemoglobin_gdl (Float)
564
+ # * :hematocrit_pct (Float)
565
+ # * :diagnosis_ids (Array<String>)
566
+ # * :epsdt_referral (Hash)
567
+ # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
568
+ # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
569
+ # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
570
+ # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
571
+ # * :claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>)
572
+ # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
573
+ # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
574
+ # * :guarantor (Hash)
575
+ # * :first_name (String)
576
+ # * :last_name (String)
577
+ # * :external_id (String)
578
+ # * :date_of_birth (Date)
579
+ # * :address (Hash)
580
+ # * :zip_plus_four_code (String)
581
+ # * :address_1 (String)
582
+ # * :address_2 (String)
583
+ # * :city (String)
584
+ # * :state (CandidApiClient::Commons::Types::State)
585
+ # * :zip_code (String)
586
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
587
+ # * :phone_consent (Boolean)
588
+ # * :email (String)
589
+ # * :email_consent (Boolean)
590
+ # * :auto_charge_consent (Boolean)
609
591
  # * :subscriber_primary (Hash)
610
592
  # * :insurance_card (Hash)
611
593
  # * :member_id (String)
@@ -687,18 +669,44 @@ module CandidApiClient
687
669
  # * :first_name (String)
688
670
  # * :last_name (String)
689
671
  # * :gender (CandidApiClient::Individual::Types::Gender)
690
- # * :prior_authorization_number (String)
691
- # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
692
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
693
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
694
- # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
695
- # * :guarantor (Hash)
696
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
697
- # * :phone_consent (Boolean)
698
- # * :email (String)
699
- # * :email_consent (Boolean)
672
+ # * :pay_to_address (Hash)
673
+ # * :zip_plus_four_code (String)
674
+ # * :address_1 (String)
675
+ # * :address_2 (String)
676
+ # * :city (String)
677
+ # * :state (CandidApiClient::Commons::Types::State)
678
+ # * :zip_code (String)
679
+ # * :initial_referring_provider (Hash)
680
+ # * :npi (String)
681
+ # * :taxonomy_code (String)
682
+ # * :address (Hash)
683
+ # * :zip_plus_four_code (String)
684
+ # * :address_1 (String)
685
+ # * :address_2 (String)
686
+ # * :city (String)
687
+ # * :state (CandidApiClient::Commons::Types::State)
688
+ # * :zip_code (String)
689
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
690
+ # * :first_name (String)
691
+ # * :last_name (String)
692
+ # * :organization_name (String)
693
+ # * :referring_provider (Hash)
694
+ # * :npi (String)
695
+ # * :taxonomy_code (String)
696
+ # * :address (Hash)
697
+ # * :zip_plus_four_code (String)
698
+ # * :address_1 (String)
699
+ # * :address_2 (String)
700
+ # * :city (String)
701
+ # * :state (CandidApiClient::Commons::Types::State)
702
+ # * :zip_code (String)
703
+ # * :first_name (String)
704
+ # * :last_name (String)
705
+ # * :organization_name (String)
706
+ # * :patient (Hash)
700
707
  # * :first_name (String)
701
708
  # * :last_name (String)
709
+ # * :gender (CandidApiClient::Individual::Types::Gender)
702
710
  # * :external_id (String)
703
711
  # * :date_of_birth (Date)
704
712
  # * :address (Hash)
@@ -708,95 +716,13 @@ module CandidApiClient
708
716
  # * :city (String)
709
717
  # * :state (CandidApiClient::Commons::Types::State)
710
718
  # * :zip_code (String)
711
- # * :external_claim_submission (Hash)
712
- # * :claim_created_at (DateTime)
713
- # * :patient_control_number (String)
714
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
715
- # * :tag_ids (Array<String>)
716
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
717
- # * :referral_number (String)
718
- # * :epsdt_referral (Hash)
719
- # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
720
- # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
721
- # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
722
- # * :claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>)
723
- # * :secondary_payer_carrier_code (String)
724
- # * :external_id (String)
725
- # * :date_of_service (Date)
726
- # * :end_date_of_service (Date)
727
- # * :patient_authorized_release (Boolean)
728
- # * :benefits_assigned_to_provider (Boolean)
729
- # * :provider_accepts_assignment (Boolean)
730
- # * :appointment_type (String)
731
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
732
- # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
733
- # * :pay_to_address (Hash)
734
- # * :zip_plus_four_code (String)
735
- # * :address_1 (String)
736
- # * :address_2 (String)
737
- # * :city (String)
738
- # * :state (CandidApiClient::Commons::Types::State)
739
- # * :zip_code (String)
740
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
741
- # * :vitals (Hash)
742
- # * :height_in (Integer)
743
- # * :weight_lbs (Integer)
744
- # * :blood_pressure_systolic_mmhg (Integer)
745
- # * :blood_pressure_diastolic_mmhg (Integer)
746
- # * :body_temperature_f (Float)
747
- # * :hemoglobin_gdl (Float)
748
- # * :hematocrit_pct (Float)
749
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
750
- # * :additional_information (String)
751
- # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
752
- # * :admission_date (Date)
753
- # * :discharge_date (Date)
754
- # * :onset_of_current_illness_or_symptom_date (Date)
755
- # * :last_menstrual_period_date (Date)
756
- # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
757
- # @param request_options [CandidApiClient::RequestOptions]
758
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
759
- # @example
760
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
761
- # api.encounters.v_4.create(request: { external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE, patient: { first_name: "first_name", last_name: "last_name", gender: MALE, external_id: "external_id", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code" } }, responsible_party: INSURANCE_PAY, billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" }, diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }], place_of_service_code: PHARMACY, rendering_provider: { npi: "npi" } })
762
- def create(request:, request_options: nil)
763
- response = @request_client.conn.post do |req|
764
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
765
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
766
- req.headers = {
767
- **(req.headers || {}),
768
- **@request_client.get_headers,
769
- **(request_options&.additional_headers || {})
770
- }.compact
771
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
772
- req.url "#{@request_client.get_url(environment: CandidApi,
773
- request_options: request_options)}/api/encounters/v4"
774
- end
775
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
776
- end
777
-
778
- # Create an encounter from a pre-encounter patient and appointment. This endpoint
779
- # is intended to be used by consumers who are managing
780
- # patients and appointments in the pre-encounter service and is currently under
781
- # development. Consumers who are not taking advantage
782
- # of the pre-encounter service should use the standard create endpoint.
783
- # The endpoint will create an encounter from the provided fields, pulling
784
- # information from the provided patient and appointment objects
785
- # where applicable. In particular, the following fields are populated from the
786
- # patient and appointment objects:
787
- # - Patient
788
- # - Referring Provider
789
- # - Subscriber Primary
790
- # - Subscriber Secondary
791
- # - Referral Number
792
- # - Responsible Party
793
- # - Guarantor
794
- # Utilizing this endpoint opts you into automatic updating of the encounter when
795
- # the patient or appointment is updated, assuming the
796
- # encounter has not already been submitted or adjudicated.
797
- #
798
- # @param request [Hash] Request of type CandidApiClient::EncountersUniversal::Types::UniversalEncounterCreateFromPreEncounter, as a Hash
799
- # * :submission_expectation (CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation)
719
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
720
+ # * :phone_consent (Boolean)
721
+ # * :email (String)
722
+ # * :email_consent (Boolean)
723
+ # * :auto_charge_consent (Boolean)
724
+ # * :non_insurance_payers (Array<String>)
725
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
800
726
  # * :rendering_provider (Hash)
801
727
  # * :npi (String)
802
728
  # * :taxonomy_code (String)
@@ -810,89 +736,9 @@ module CandidApiClient
810
736
  # * :first_name (String)
811
737
  # * :last_name (String)
812
738
  # * :organization_name (String)
813
- # * :health_care_code_information (Hash)
814
- # * :principal_diagnosis (Hash)
815
- # * :principal_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisCodeQualifier)
816
- # * :primary_diagnosis_code (String)
817
- # * :present_on_admission_indicator (CandidApiClient::HealthCareCodeInformation::V1::Types::PresentOnAdmissionIndicatorCode)
818
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
819
- # * :industry_code_1 (String)
820
- # * :industry_code_2 (String)
821
- # * :industry_code_3 (String)
822
- # * :industry_code_4 (String)
823
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
824
- # * :date_time_period (String)
825
- # * :monetary_amount (String)
826
- # * :quantity (String)
827
- # * :admitting_diagnosis (Hash)
828
- # * :admitting_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisCodeQualifier)
829
- # * :admitting_diagnosis_code (String)
830
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
831
- # * :industry_code_1 (String)
832
- # * :industry_code_2 (String)
833
- # * :industry_code_3 (String)
834
- # * :industry_code_4 (String)
835
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
836
- # * :date_time_period (String)
837
- # * :monetary_amount (String)
838
- # * :quantity (String)
839
- # * :patient_reasons_for_visit (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitNew>)
840
- # * :external_causes_of_injury (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ExternalCauseOfInjuryNew>)
841
- # * :diagnosis_related_groups (Hash)
842
- # * :diagnosis_related_group_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupCodeQualifier)
843
- # * :diagnosis_related_group_code (String)
844
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
845
- # * :industry_code_1 (String)
846
- # * :industry_code_2 (String)
847
- # * :industry_code_3 (String)
848
- # * :industry_code_4 (String)
849
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
850
- # * :date_time_period (String)
851
- # * :monetary_amount (String)
852
- # * :quantity (String)
853
- # * :other_diagnosis_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherDiagnosisInformationNew>)
854
- # * :principal_procedure (Hash)
855
- # * :principal_procedure_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationCodeQualifier)
856
- # * :principal_procedure_code (String)
857
- # * :procedure_date (DateTime)
858
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
859
- # * :industry_code_1 (String)
860
- # * :industry_code_2 (String)
861
- # * :industry_code_3 (String)
862
- # * :industry_code_4 (String)
863
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
864
- # * :date_time_period (String)
865
- # * :monetary_amount (String)
866
- # * :quantity (String)
867
- # * :other_procedure_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationNew>)
868
- # * :occurrence_span_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformationNew>)
869
- # * :occurrence_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationNew>)
870
- # * :treatment_code_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::TreatmentCodeInformationNew>)
871
- # * :value_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ValueInformationNew>)
872
- # * :condition_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ConditionInformationNew>)
873
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
874
- # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreate>)
875
- # * :attending_provider (Hash)
876
- # * :npi (String)
877
- # * :taxonomy_code (String)
878
- # * :address (Hash)
879
- # * :zip_plus_four_code (String)
880
- # * :address_1 (String)
881
- # * :address_2 (String)
882
- # * :city (String)
883
- # * :state (CandidApiClient::Commons::Types::State)
884
- # * :zip_code (String)
885
- # * :first_name (String)
886
- # * :last_name (String)
739
+ # * :service_facility (Hash)
887
740
  # * :organization_name (String)
888
- # * :admission_hour (Integer)
889
- # * :admission_type_code (CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode)
890
- # * :admission_source_code (CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode)
891
- # * :discharge_hour (Integer)
892
- # * :discharge_status (CandidApiClient::X12::V1::Types::PatientDischargeStatusCode)
893
- # * :operating_provider (Hash)
894
741
  # * :npi (String)
895
- # * :taxonomy_code (String)
896
742
  # * :address (Hash)
897
743
  # * :zip_plus_four_code (String)
898
744
  # * :address_1 (String)
@@ -900,10 +746,8 @@ module CandidApiClient
900
746
  # * :city (String)
901
747
  # * :state (CandidApiClient::Commons::Types::State)
902
748
  # * :zip_code (String)
903
- # * :first_name (String)
904
- # * :last_name (String)
905
- # * :organization_name (String)
906
- # * :other_operating_provider (Hash)
749
+ # * :secondary_identification (String)
750
+ # * :supervising_provider (Hash)
907
751
  # * :npi (String)
908
752
  # * :taxonomy_code (String)
909
753
  # * :address (Hash)
@@ -916,10 +760,6 @@ module CandidApiClient
916
760
  # * :first_name (String)
917
761
  # * :last_name (String)
918
762
  # * :organization_name (String)
919
- # * :type_of_bill (Hash)
920
- # * :accident_state_or_province_code (CandidApiClient::Commons::Types::State)
921
- # * :pre_encounter_patient_id (String)
922
- # * :pre_encounter_appointment_ids (Array<String>)
923
763
  # * :billing_provider (Hash)
924
764
  # * :address (Hash)
925
765
  # * :zip_plus_four_code (String)
@@ -935,79 +775,19 @@ module CandidApiClient
935
775
  # * :first_name (String)
936
776
  # * :last_name (String)
937
777
  # * :organization_name (String)
938
- # * :initial_referring_provider (Hash)
939
- # * :npi (String)
940
- # * :taxonomy_code (String)
941
- # * :address (Hash)
942
- # * :zip_plus_four_code (String)
943
- # * :address_1 (String)
944
- # * :address_2 (String)
945
- # * :city (String)
946
- # * :state (CandidApiClient::Commons::Types::State)
947
- # * :zip_code (String)
948
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
949
- # * :first_name (String)
950
- # * :last_name (String)
951
- # * :organization_name (String)
952
- # * :supervising_provider (Hash)
953
- # * :npi (String)
954
- # * :taxonomy_code (String)
955
- # * :address (Hash)
956
- # * :zip_plus_four_code (String)
957
- # * :address_1 (String)
958
- # * :address_2 (String)
959
- # * :city (String)
960
- # * :state (CandidApiClient::Commons::Types::State)
961
- # * :zip_code (String)
962
- # * :first_name (String)
963
- # * :last_name (String)
964
- # * :organization_name (String)
965
- # * :service_facility (Hash)
966
- # * :organization_name (String)
967
- # * :npi (String)
968
- # * :address (Hash)
969
- # * :zip_plus_four_code (String)
970
- # * :address_1 (String)
971
- # * :address_2 (String)
972
- # * :city (String)
973
- # * :state (CandidApiClient::Commons::Types::State)
974
- # * :zip_code (String)
975
- # * :secondary_identification (String)
976
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
977
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
978
- # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
979
- # * :external_claim_submission (Hash)
980
- # * :claim_created_at (DateTime)
981
- # * :patient_control_number (String)
982
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
983
- # * :tag_ids (Array<String>)
984
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
778
+ # * :place_of_service_code_as_submitted (CandidApiClient::Commons::Types::FacilityTypeCode)
779
+ # * :benefits_assigned_to_provider (Boolean)
780
+ # * :prior_authorization_number (String)
985
781
  # * :external_id (String)
986
782
  # * :date_of_service (Date)
987
- # * :end_date_of_service (Date)
988
- # * :patient_authorized_release (Boolean)
989
- # * :benefits_assigned_to_provider (Boolean)
783
+ # * :tag_ids (Array<String>)
784
+ # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
785
+ # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
990
786
  # * :provider_accepts_assignment (Boolean)
991
- # * :appointment_type (String)
992
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
993
- # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
994
- # * :pay_to_address (Hash)
995
- # * :zip_plus_four_code (String)
996
- # * :address_1 (String)
997
- # * :address_2 (String)
998
- # * :city (String)
999
- # * :state (CandidApiClient::Commons::Types::State)
1000
- # * :zip_code (String)
1001
787
  # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
1002
- # * :vitals (Hash)
1003
- # * :height_in (Integer)
1004
- # * :weight_lbs (Integer)
1005
- # * :blood_pressure_systolic_mmhg (Integer)
1006
- # * :blood_pressure_diastolic_mmhg (Integer)
1007
- # * :body_temperature_f (Float)
1008
- # * :hemoglobin_gdl (Float)
1009
- # * :hematocrit_pct (Float)
1010
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
788
+ # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
789
+ # * :appointment_type (String)
790
+ # * :end_date_of_service (Date)
1011
791
  # * :additional_information (String)
1012
792
  # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
1013
793
  # * :admission_date (Date)
@@ -1015,13 +795,16 @@ module CandidApiClient
1015
795
  # * :onset_of_current_illness_or_symptom_date (Date)
1016
796
  # * :last_menstrual_period_date (Date)
1017
797
  # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
798
+ # * :patient_authorized_release (Boolean)
799
+ # * :referral_number (String)
800
+ # * :secondary_payer_carrier_code (String)
1018
801
  # @param request_options [CandidApiClient::RequestOptions]
1019
802
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1020
803
  # @example
1021
804
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1022
- # api.encounters.v_4.create_from_pre_encounter_patient_universal(request: { external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE, pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" }, submission_expectation: TARGET_PROFESSIONAL })
1023
- def create_from_pre_encounter_patient_universal(request:, request_options: nil)
1024
- response = @request_client.conn.post do |req|
805
+ # api.encounters.v_4.update(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { })
806
+ def update(encounter_id:, request:, request_options: nil)
807
+ response = @request_client.conn.patch do |req|
1025
808
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1026
809
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1027
810
  req.headers = {
@@ -1031,1818 +814,109 @@ module CandidApiClient
1031
814
  }.compact
1032
815
  req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
1033
816
  req.url "#{@request_client.get_url(environment: CandidApi,
1034
- request_options: request_options)}/api/encounters/v4/create-from-pre-encounter/universal"
817
+ request_options: request_options)}/api/encounters/v4/#{encounter_id}"
1035
818
  end
1036
819
  CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
1037
820
  end
821
+ end
1038
822
 
1039
- # Create an encounter from a pre-encounter patient and appointment. This endpoint
1040
- # is intended to be used by consumers who are managing
1041
- # patients and appointments in the pre-encounter service and is currently under
1042
- # development. Consumers who are not taking advantage
1043
- # of the pre-encounter service should use the standard create endpoint.
1044
- # The endpoint will create an encounter from the provided fields, pulling
1045
- # information from the provided patient and appointment objects
1046
- # where applicable. In particular, the following fields are populated from the
1047
- # patient and appointment objects:
1048
- # - Patient
1049
- # - Referring Provider
1050
- # - Subscriber Primary
1051
- # - Subscriber Secondary
1052
- # - Referral Number
1053
- # - Responsible Party
1054
- # - Guarantor
1055
- # Utilizing this endpoint opts you into automatic updating of the encounter when
1056
- # the patient or appointment is updated, assuming the
1057
- # encounter has not already been submitted or adjudicated.
1058
- #
1059
- # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreateFromPreEncounter, as a Hash
1060
- # * :rendering_provider (Hash)
1061
- # * :npi (String)
1062
- # * :taxonomy_code (String)
1063
- # * :address (Hash)
1064
- # * :zip_plus_four_code (String)
1065
- # * :address_1 (String)
1066
- # * :address_2 (String)
1067
- # * :city (String)
1068
- # * :state (CandidApiClient::Commons::Types::State)
1069
- # * :zip_code (String)
1070
- # * :first_name (String)
1071
- # * :last_name (String)
1072
- # * :organization_name (String)
1073
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
1074
- # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
1075
- # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
1076
- # * :pre_encounter_patient_id (String)
1077
- # * :pre_encounter_appointment_ids (Array<String>)
1078
- # * :billing_provider (Hash)
1079
- # * :address (Hash)
1080
- # * :zip_plus_four_code (String)
1081
- # * :address_1 (String)
1082
- # * :address_2 (String)
1083
- # * :city (String)
1084
- # * :state (CandidApiClient::Commons::Types::State)
1085
- # * :zip_code (String)
1086
- # * :tax_id (String)
1087
- # * :npi (String)
1088
- # * :taxonomy_code (String)
1089
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
1090
- # * :first_name (String)
1091
- # * :last_name (String)
1092
- # * :organization_name (String)
1093
- # * :initial_referring_provider (Hash)
1094
- # * :npi (String)
1095
- # * :taxonomy_code (String)
1096
- # * :address (Hash)
1097
- # * :zip_plus_four_code (String)
1098
- # * :address_1 (String)
1099
- # * :address_2 (String)
1100
- # * :city (String)
1101
- # * :state (CandidApiClient::Commons::Types::State)
1102
- # * :zip_code (String)
1103
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
1104
- # * :first_name (String)
1105
- # * :last_name (String)
1106
- # * :organization_name (String)
1107
- # * :supervising_provider (Hash)
1108
- # * :npi (String)
1109
- # * :taxonomy_code (String)
1110
- # * :address (Hash)
1111
- # * :zip_plus_four_code (String)
1112
- # * :address_1 (String)
1113
- # * :address_2 (String)
1114
- # * :city (String)
1115
- # * :state (CandidApiClient::Commons::Types::State)
1116
- # * :zip_code (String)
1117
- # * :first_name (String)
1118
- # * :last_name (String)
1119
- # * :organization_name (String)
1120
- # * :service_facility (Hash)
1121
- # * :organization_name (String)
1122
- # * :npi (String)
1123
- # * :address (Hash)
1124
- # * :zip_plus_four_code (String)
1125
- # * :address_1 (String)
1126
- # * :address_2 (String)
1127
- # * :city (String)
1128
- # * :state (CandidApiClient::Commons::Types::State)
1129
- # * :zip_code (String)
1130
- # * :secondary_identification (String)
1131
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
1132
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
1133
- # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
1134
- # * :external_claim_submission (Hash)
1135
- # * :claim_created_at (DateTime)
1136
- # * :patient_control_number (String)
1137
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
1138
- # * :tag_ids (Array<String>)
1139
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
1140
- # * :external_id (String)
1141
- # * :date_of_service (Date)
1142
- # * :end_date_of_service (Date)
1143
- # * :patient_authorized_release (Boolean)
1144
- # * :benefits_assigned_to_provider (Boolean)
1145
- # * :provider_accepts_assignment (Boolean)
1146
- # * :appointment_type (String)
1147
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
1148
- # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
1149
- # * :pay_to_address (Hash)
1150
- # * :zip_plus_four_code (String)
1151
- # * :address_1 (String)
1152
- # * :address_2 (String)
1153
- # * :city (String)
1154
- # * :state (CandidApiClient::Commons::Types::State)
1155
- # * :zip_code (String)
1156
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
1157
- # * :vitals (Hash)
1158
- # * :height_in (Integer)
1159
- # * :weight_lbs (Integer)
1160
- # * :blood_pressure_systolic_mmhg (Integer)
1161
- # * :blood_pressure_diastolic_mmhg (Integer)
1162
- # * :body_temperature_f (Float)
1163
- # * :hemoglobin_gdl (Float)
1164
- # * :hematocrit_pct (Float)
1165
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
1166
- # * :additional_information (String)
1167
- # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
1168
- # * :admission_date (Date)
1169
- # * :discharge_date (Date)
1170
- # * :onset_of_current_illness_or_symptom_date (Date)
1171
- # * :last_menstrual_period_date (Date)
1172
- # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
1173
- # @param request_options [CandidApiClient::RequestOptions]
1174
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1175
- # @example
1176
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1177
- # api.encounters.v_4.create_from_pre_encounter_patient(request: { external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE, pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" }, rendering_provider: { npi: "npi" }, place_of_service_code: PHARMACY, diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }] })
1178
- def create_from_pre_encounter_patient(request:, request_options: nil)
1179
- response = @request_client.conn.post do |req|
1180
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1181
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1182
- req.headers = {
1183
- **(req.headers || {}),
1184
- **@request_client.get_headers,
1185
- **(request_options&.additional_headers || {})
1186
- }.compact
1187
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
1188
- req.url "#{@request_client.get_url(environment: CandidApi,
1189
- request_options: request_options)}/api/encounters/v4/create-from-pre-encounter"
1190
- end
1191
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
1192
- end
1193
-
1194
- # @param encounter_id [String]
1195
- # @param request [Hash] Request of type CandidApiClient::EncountersUniversal::Types::UniversalEncounterUpdate, as a Hash
1196
- # * :health_care_code_information (Hash)
1197
- # * :principal_diagnosis (Hash)
1198
- # * :value (Hash)
1199
- # * :principal_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisCodeQualifier)
1200
- # * :primary_diagnosis_code (String)
1201
- # * :present_on_admission_indicator (CandidApiClient::HealthCareCodeInformation::V1::Types::PresentOnAdmissionIndicatorCode)
1202
- # * :id (String)
1203
- # * :encounter_id (String)
1204
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
1205
- # * :industry_code_1 (String)
1206
- # * :industry_code_2 (String)
1207
- # * :industry_code_3 (String)
1208
- # * :industry_code_4 (String)
1209
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
1210
- # * :date_time_period (String)
1211
- # * :monetary_amount (String)
1212
- # * :quantity (String)
1213
- # * :admitting_diagnosis (Hash)
1214
- # * :value (Hash)
1215
- # * :admitting_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisCodeQualifier)
1216
- # * :admitting_diagnosis_code (String)
1217
- # * :id (String)
1218
- # * :encounter_id (String)
1219
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
1220
- # * :industry_code_1 (String)
1221
- # * :industry_code_2 (String)
1222
- # * :industry_code_3 (String)
1223
- # * :industry_code_4 (String)
1224
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
1225
- # * :date_time_period (String)
1226
- # * :monetary_amount (String)
1227
- # * :quantity (String)
1228
- # * :patient_reasons_for_visit (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisit>)
1229
- # * :external_causes_of_injury (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ExternalCauseOfInjury>)
1230
- # * :diagnosis_related_groups (Hash)
1231
- # * :value (Hash)
1232
- # * :diagnosis_related_group_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupCodeQualifier)
1233
- # * :diagnosis_related_group_code (String)
1234
- # * :id (String)
1235
- # * :encounter_id (String)
1236
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
1237
- # * :industry_code_1 (String)
1238
- # * :industry_code_2 (String)
1239
- # * :industry_code_3 (String)
1240
- # * :industry_code_4 (String)
1241
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
1242
- # * :date_time_period (String)
1243
- # * :monetary_amount (String)
1244
- # * :quantity (String)
1245
- # * :other_diagnosis_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherDiagnosisInformation>)
1246
- # * :principal_procedure (Hash)
1247
- # * :value (Hash)
1248
- # * :principal_procedure_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationCodeQualifier)
1249
- # * :principal_procedure_code (String)
1250
- # * :procedure_date (DateTime)
1251
- # * :id (String)
1252
- # * :encounter_id (String)
1253
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
1254
- # * :industry_code_1 (String)
1255
- # * :industry_code_2 (String)
1256
- # * :industry_code_3 (String)
1257
- # * :industry_code_4 (String)
1258
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
1259
- # * :date_time_period (String)
1260
- # * :monetary_amount (String)
1261
- # * :quantity (String)
1262
- # * :other_procedure_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformation>)
1263
- # * :occurrence_span_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformation>)
1264
- # * :occurrence_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformation>)
1265
- # * :treatment_code_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::TreatmentCodeInformation>)
1266
- # * :value_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ValueInformation>)
1267
- # * :condition_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ConditionInformation>)
1268
- # * :attending_provider (Hash)
1269
- # * :npi (String)
1270
- # * :taxonomy_code (String)
1271
- # * :address (Hash)
1272
- # * :zip_plus_four_code (String)
1273
- # * :address_1 (String)
1274
- # * :address_2 (String)
1275
- # * :city (String)
1276
- # * :state (CandidApiClient::Commons::Types::State)
1277
- # * :zip_code (String)
1278
- # * :first_name (String)
1279
- # * :last_name (String)
1280
- # * :organization_name (String)
1281
- # * :admission_hour (Integer)
1282
- # * :admission_type_code (CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode)
1283
- # * :admission_source_code (CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode)
1284
- # * :discharge_hour (Integer)
1285
- # * :discharge_status (CandidApiClient::X12::V1::Types::PatientDischargeStatusCode)
1286
- # * :operating_provider (Hash)
1287
- # * :npi (String)
1288
- # * :taxonomy_code (String)
1289
- # * :address (Hash)
1290
- # * :zip_plus_four_code (String)
1291
- # * :address_1 (String)
1292
- # * :address_2 (String)
1293
- # * :city (String)
1294
- # * :state (CandidApiClient::Commons::Types::State)
1295
- # * :zip_code (String)
1296
- # * :first_name (String)
1297
- # * :last_name (String)
1298
- # * :organization_name (String)
1299
- # * :other_operating_provider (Hash)
1300
- # * :npi (String)
1301
- # * :taxonomy_code (String)
1302
- # * :address (Hash)
1303
- # * :zip_plus_four_code (String)
1304
- # * :address_1 (String)
1305
- # * :address_2 (String)
1306
- # * :city (String)
1307
- # * :state (CandidApiClient::Commons::Types::State)
1308
- # * :zip_code (String)
1309
- # * :first_name (String)
1310
- # * :last_name (String)
1311
- # * :organization_name (String)
1312
- # * :type_of_bill (Hash)
1313
- # * :accident_state_or_province_code (CandidApiClient::Commons::Types::State)
1314
- # * :submission_expectation (CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation)
1315
- # * :epsdt_referral (Hash)
1316
- # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1317
- # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1318
- # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1319
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
1320
- # * :claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>)
1321
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
1322
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
1323
- # * :guarantor (Hash)
1324
- # * :first_name (String)
1325
- # * :last_name (String)
1326
- # * :external_id (String)
1327
- # * :date_of_birth (Date)
1328
- # * :address (Hash)
1329
- # * :zip_plus_four_code (String)
1330
- # * :address_1 (String)
1331
- # * :address_2 (String)
1332
- # * :city (String)
1333
- # * :state (CandidApiClient::Commons::Types::State)
1334
- # * :zip_code (String)
1335
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
1336
- # * :phone_consent (Boolean)
1337
- # * :email (String)
1338
- # * :email_consent (Boolean)
1339
- # * :subscriber_primary (Hash)
1340
- # * :insurance_card (Hash)
1341
- # * :member_id (String)
1342
- # * :payer_name (String)
1343
- # * :payer_id (String)
1344
- # * :rx_bin (String)
1345
- # * :rx_pcn (String)
1346
- # * :image_url_front (String)
1347
- # * :image_url_back (String)
1348
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1349
- # * :group_number (String)
1350
- # * :plan_name (String)
1351
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1352
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1353
- # * :payer_plan_group_id (String)
1354
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1355
- # * :date_of_birth (Date)
1356
- # * :address (Hash)
1357
- # * :zip_plus_four_code (String)
1358
- # * :address_1 (String)
1359
- # * :address_2 (String)
1360
- # * :city (String)
1361
- # * :state (CandidApiClient::Commons::Types::State)
1362
- # * :zip_code (String)
1363
- # * :first_name (String)
1364
- # * :last_name (String)
1365
- # * :gender (CandidApiClient::Individual::Types::Gender)
1366
- # * :subscriber_secondary (Hash)
1367
- # * :insurance_card (Hash)
1368
- # * :member_id (String)
1369
- # * :payer_name (String)
1370
- # * :payer_id (String)
1371
- # * :rx_bin (String)
1372
- # * :rx_pcn (String)
1373
- # * :image_url_front (String)
1374
- # * :image_url_back (String)
1375
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1376
- # * :group_number (String)
1377
- # * :plan_name (String)
1378
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1379
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1380
- # * :payer_plan_group_id (String)
1381
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1382
- # * :date_of_birth (Date)
1383
- # * :address (Hash)
1384
- # * :zip_plus_four_code (String)
1385
- # * :address_1 (String)
1386
- # * :address_2 (String)
1387
- # * :city (String)
1388
- # * :state (CandidApiClient::Commons::Types::State)
1389
- # * :zip_code (String)
1390
- # * :first_name (String)
1391
- # * :last_name (String)
1392
- # * :gender (CandidApiClient::Individual::Types::Gender)
1393
- # * :subscriber_tertiary (Hash)
1394
- # * :insurance_card (Hash)
1395
- # * :member_id (String)
1396
- # * :payer_name (String)
1397
- # * :payer_id (String)
1398
- # * :rx_bin (String)
1399
- # * :rx_pcn (String)
1400
- # * :image_url_front (String)
1401
- # * :image_url_back (String)
1402
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1403
- # * :group_number (String)
1404
- # * :plan_name (String)
1405
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1406
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1407
- # * :payer_plan_group_id (String)
1408
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1409
- # * :date_of_birth (Date)
1410
- # * :address (Hash)
1411
- # * :zip_plus_four_code (String)
1412
- # * :address_1 (String)
1413
- # * :address_2 (String)
1414
- # * :city (String)
1415
- # * :state (CandidApiClient::Commons::Types::State)
1416
- # * :zip_code (String)
1417
- # * :first_name (String)
1418
- # * :last_name (String)
1419
- # * :gender (CandidApiClient::Individual::Types::Gender)
1420
- # * :pay_to_address (Hash)
1421
- # * :zip_plus_four_code (String)
1422
- # * :address_1 (String)
1423
- # * :address_2 (String)
1424
- # * :city (String)
1425
- # * :state (CandidApiClient::Commons::Types::State)
1426
- # * :zip_code (String)
1427
- # * :initial_referring_provider (Hash)
1428
- # * :npi (String)
1429
- # * :taxonomy_code (String)
1430
- # * :address (Hash)
1431
- # * :zip_plus_four_code (String)
1432
- # * :address_1 (String)
1433
- # * :address_2 (String)
1434
- # * :city (String)
1435
- # * :state (CandidApiClient::Commons::Types::State)
1436
- # * :zip_code (String)
1437
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
1438
- # * :first_name (String)
1439
- # * :last_name (String)
1440
- # * :organization_name (String)
1441
- # * :referring_provider (Hash)
1442
- # * :npi (String)
1443
- # * :taxonomy_code (String)
1444
- # * :address (Hash)
1445
- # * :zip_plus_four_code (String)
1446
- # * :address_1 (String)
1447
- # * :address_2 (String)
1448
- # * :city (String)
1449
- # * :state (CandidApiClient::Commons::Types::State)
1450
- # * :zip_code (String)
1451
- # * :first_name (String)
1452
- # * :last_name (String)
1453
- # * :organization_name (String)
1454
- # * :patient (Hash)
1455
- # * :first_name (String)
1456
- # * :last_name (String)
1457
- # * :gender (CandidApiClient::Individual::Types::Gender)
1458
- # * :external_id (String)
1459
- # * :date_of_birth (Date)
1460
- # * :address (Hash)
1461
- # * :zip_plus_four_code (String)
1462
- # * :address_1 (String)
1463
- # * :address_2 (String)
1464
- # * :city (String)
1465
- # * :state (CandidApiClient::Commons::Types::State)
1466
- # * :zip_code (String)
1467
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
1468
- # * :phone_consent (Boolean)
1469
- # * :email (String)
1470
- # * :email_consent (Boolean)
1471
- # * :non_insurance_payers (Array<String>)
1472
- # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
1473
- # * :rendering_provider (Hash)
1474
- # * :npi (String)
1475
- # * :taxonomy_code (String)
1476
- # * :address (Hash)
1477
- # * :zip_plus_four_code (String)
1478
- # * :address_1 (String)
1479
- # * :address_2 (String)
1480
- # * :city (String)
1481
- # * :state (CandidApiClient::Commons::Types::State)
1482
- # * :zip_code (String)
1483
- # * :first_name (String)
1484
- # * :last_name (String)
1485
- # * :organization_name (String)
1486
- # * :service_facility (Hash)
1487
- # * :organization_name (String)
1488
- # * :npi (String)
1489
- # * :address (Hash)
1490
- # * :zip_plus_four_code (String)
1491
- # * :address_1 (String)
1492
- # * :address_2 (String)
1493
- # * :city (String)
1494
- # * :state (CandidApiClient::Commons::Types::State)
1495
- # * :zip_code (String)
1496
- # * :secondary_identification (String)
1497
- # * :supervising_provider (Hash)
1498
- # * :npi (String)
1499
- # * :taxonomy_code (String)
1500
- # * :address (Hash)
1501
- # * :zip_plus_four_code (String)
1502
- # * :address_1 (String)
1503
- # * :address_2 (String)
1504
- # * :city (String)
1505
- # * :state (CandidApiClient::Commons::Types::State)
1506
- # * :zip_code (String)
1507
- # * :first_name (String)
1508
- # * :last_name (String)
1509
- # * :organization_name (String)
1510
- # * :billing_provider (Hash)
1511
- # * :address (Hash)
1512
- # * :zip_plus_four_code (String)
1513
- # * :address_1 (String)
1514
- # * :address_2 (String)
1515
- # * :city (String)
1516
- # * :state (CandidApiClient::Commons::Types::State)
1517
- # * :zip_code (String)
1518
- # * :tax_id (String)
1519
- # * :npi (String)
1520
- # * :taxonomy_code (String)
1521
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
1522
- # * :first_name (String)
1523
- # * :last_name (String)
1524
- # * :organization_name (String)
1525
- # * :place_of_service_code_as_submitted (CandidApiClient::Commons::Types::FacilityTypeCode)
1526
- # * :benefits_assigned_to_provider (Boolean)
1527
- # * :prior_authorization_number (String)
1528
- # * :external_id (String)
1529
- # * :date_of_service (Date)
1530
- # * :tag_ids (Array<String>)
1531
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
1532
- # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
1533
- # * :provider_accepts_assignment (Boolean)
1534
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
1535
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
1536
- # * :appointment_type (String)
1537
- # * :end_date_of_service (Date)
1538
- # * :additional_information (String)
1539
- # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
1540
- # * :admission_date (Date)
1541
- # * :discharge_date (Date)
1542
- # * :onset_of_current_illness_or_symptom_date (Date)
1543
- # * :last_menstrual_period_date (Date)
1544
- # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
1545
- # * :patient_authorized_release (Boolean)
1546
- # * :referral_number (String)
1547
- # * :secondary_payer_carrier_code (String)
1548
- # @param request_options [CandidApiClient::RequestOptions]
1549
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1550
- # @example
1551
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1552
- # api.encounters.v_4.update_universal(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { })
1553
- def update_universal(encounter_id:, request:, request_options: nil)
1554
- response = @request_client.conn.patch do |req|
1555
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1556
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1557
- req.headers = {
1558
- **(req.headers || {}),
1559
- **@request_client.get_headers,
1560
- **(request_options&.additional_headers || {})
1561
- }.compact
1562
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
1563
- req.url "#{@request_client.get_url(environment: CandidApi,
1564
- request_options: request_options)}/api/encounters/v4/#{encounter_id}/universal"
1565
- end
1566
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
1567
- end
1568
-
1569
- # @param encounter_id [String]
1570
- # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterUpdate, as a Hash
1571
- # * :vitals (Hash)
1572
- # * :height_in (Integer)
1573
- # * :weight_lbs (Integer)
1574
- # * :blood_pressure_systolic_mmhg (Integer)
1575
- # * :blood_pressure_diastolic_mmhg (Integer)
1576
- # * :body_temperature_f (Float)
1577
- # * :hemoglobin_gdl (Float)
1578
- # * :hematocrit_pct (Float)
1579
- # * :diagnosis_ids (Array<String>)
1580
- # * :epsdt_referral (Hash)
1581
- # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1582
- # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1583
- # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1584
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
1585
- # * :claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>)
1586
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
1587
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
1588
- # * :guarantor (Hash)
1589
- # * :first_name (String)
1590
- # * :last_name (String)
1591
- # * :external_id (String)
1592
- # * :date_of_birth (Date)
1593
- # * :address (Hash)
1594
- # * :zip_plus_four_code (String)
1595
- # * :address_1 (String)
1596
- # * :address_2 (String)
1597
- # * :city (String)
1598
- # * :state (CandidApiClient::Commons::Types::State)
1599
- # * :zip_code (String)
1600
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
1601
- # * :phone_consent (Boolean)
1602
- # * :email (String)
1603
- # * :email_consent (Boolean)
1604
- # * :subscriber_primary (Hash)
1605
- # * :insurance_card (Hash)
1606
- # * :member_id (String)
1607
- # * :payer_name (String)
1608
- # * :payer_id (String)
1609
- # * :rx_bin (String)
1610
- # * :rx_pcn (String)
1611
- # * :image_url_front (String)
1612
- # * :image_url_back (String)
1613
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1614
- # * :group_number (String)
1615
- # * :plan_name (String)
1616
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1617
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1618
- # * :payer_plan_group_id (String)
1619
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1620
- # * :date_of_birth (Date)
1621
- # * :address (Hash)
1622
- # * :zip_plus_four_code (String)
1623
- # * :address_1 (String)
1624
- # * :address_2 (String)
1625
- # * :city (String)
1626
- # * :state (CandidApiClient::Commons::Types::State)
1627
- # * :zip_code (String)
1628
- # * :first_name (String)
1629
- # * :last_name (String)
1630
- # * :gender (CandidApiClient::Individual::Types::Gender)
1631
- # * :subscriber_secondary (Hash)
1632
- # * :insurance_card (Hash)
1633
- # * :member_id (String)
1634
- # * :payer_name (String)
1635
- # * :payer_id (String)
1636
- # * :rx_bin (String)
1637
- # * :rx_pcn (String)
1638
- # * :image_url_front (String)
1639
- # * :image_url_back (String)
1640
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1641
- # * :group_number (String)
1642
- # * :plan_name (String)
1643
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1644
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1645
- # * :payer_plan_group_id (String)
1646
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1647
- # * :date_of_birth (Date)
1648
- # * :address (Hash)
1649
- # * :zip_plus_four_code (String)
1650
- # * :address_1 (String)
1651
- # * :address_2 (String)
1652
- # * :city (String)
1653
- # * :state (CandidApiClient::Commons::Types::State)
1654
- # * :zip_code (String)
1655
- # * :first_name (String)
1656
- # * :last_name (String)
1657
- # * :gender (CandidApiClient::Individual::Types::Gender)
1658
- # * :subscriber_tertiary (Hash)
1659
- # * :insurance_card (Hash)
1660
- # * :member_id (String)
1661
- # * :payer_name (String)
1662
- # * :payer_id (String)
1663
- # * :rx_bin (String)
1664
- # * :rx_pcn (String)
1665
- # * :image_url_front (String)
1666
- # * :image_url_back (String)
1667
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1668
- # * :group_number (String)
1669
- # * :plan_name (String)
1670
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1671
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1672
- # * :payer_plan_group_id (String)
1673
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1674
- # * :date_of_birth (Date)
1675
- # * :address (Hash)
1676
- # * :zip_plus_four_code (String)
1677
- # * :address_1 (String)
1678
- # * :address_2 (String)
1679
- # * :city (String)
1680
- # * :state (CandidApiClient::Commons::Types::State)
1681
- # * :zip_code (String)
1682
- # * :first_name (String)
1683
- # * :last_name (String)
1684
- # * :gender (CandidApiClient::Individual::Types::Gender)
1685
- # * :pay_to_address (Hash)
1686
- # * :zip_plus_four_code (String)
1687
- # * :address_1 (String)
1688
- # * :address_2 (String)
1689
- # * :city (String)
1690
- # * :state (CandidApiClient::Commons::Types::State)
1691
- # * :zip_code (String)
1692
- # * :initial_referring_provider (Hash)
1693
- # * :npi (String)
1694
- # * :taxonomy_code (String)
1695
- # * :address (Hash)
1696
- # * :zip_plus_four_code (String)
1697
- # * :address_1 (String)
1698
- # * :address_2 (String)
1699
- # * :city (String)
1700
- # * :state (CandidApiClient::Commons::Types::State)
1701
- # * :zip_code (String)
1702
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
1703
- # * :first_name (String)
1704
- # * :last_name (String)
1705
- # * :organization_name (String)
1706
- # * :referring_provider (Hash)
1707
- # * :npi (String)
1708
- # * :taxonomy_code (String)
1709
- # * :address (Hash)
1710
- # * :zip_plus_four_code (String)
1711
- # * :address_1 (String)
1712
- # * :address_2 (String)
1713
- # * :city (String)
1714
- # * :state (CandidApiClient::Commons::Types::State)
1715
- # * :zip_code (String)
1716
- # * :first_name (String)
1717
- # * :last_name (String)
1718
- # * :organization_name (String)
1719
- # * :patient (Hash)
1720
- # * :first_name (String)
1721
- # * :last_name (String)
1722
- # * :gender (CandidApiClient::Individual::Types::Gender)
1723
- # * :external_id (String)
1724
- # * :date_of_birth (Date)
1725
- # * :address (Hash)
1726
- # * :zip_plus_four_code (String)
1727
- # * :address_1 (String)
1728
- # * :address_2 (String)
1729
- # * :city (String)
1730
- # * :state (CandidApiClient::Commons::Types::State)
1731
- # * :zip_code (String)
1732
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
1733
- # * :phone_consent (Boolean)
1734
- # * :email (String)
1735
- # * :email_consent (Boolean)
1736
- # * :non_insurance_payers (Array<String>)
1737
- # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
1738
- # * :rendering_provider (Hash)
1739
- # * :npi (String)
1740
- # * :taxonomy_code (String)
1741
- # * :address (Hash)
1742
- # * :zip_plus_four_code (String)
1743
- # * :address_1 (String)
1744
- # * :address_2 (String)
1745
- # * :city (String)
1746
- # * :state (CandidApiClient::Commons::Types::State)
1747
- # * :zip_code (String)
1748
- # * :first_name (String)
1749
- # * :last_name (String)
1750
- # * :organization_name (String)
1751
- # * :service_facility (Hash)
1752
- # * :organization_name (String)
1753
- # * :npi (String)
1754
- # * :address (Hash)
1755
- # * :zip_plus_four_code (String)
1756
- # * :address_1 (String)
1757
- # * :address_2 (String)
1758
- # * :city (String)
1759
- # * :state (CandidApiClient::Commons::Types::State)
1760
- # * :zip_code (String)
1761
- # * :secondary_identification (String)
1762
- # * :supervising_provider (Hash)
1763
- # * :npi (String)
1764
- # * :taxonomy_code (String)
1765
- # * :address (Hash)
1766
- # * :zip_plus_four_code (String)
1767
- # * :address_1 (String)
1768
- # * :address_2 (String)
1769
- # * :city (String)
1770
- # * :state (CandidApiClient::Commons::Types::State)
1771
- # * :zip_code (String)
1772
- # * :first_name (String)
1773
- # * :last_name (String)
1774
- # * :organization_name (String)
1775
- # * :billing_provider (Hash)
1776
- # * :address (Hash)
1777
- # * :zip_plus_four_code (String)
1778
- # * :address_1 (String)
1779
- # * :address_2 (String)
1780
- # * :city (String)
1781
- # * :state (CandidApiClient::Commons::Types::State)
1782
- # * :zip_code (String)
1783
- # * :tax_id (String)
1784
- # * :npi (String)
1785
- # * :taxonomy_code (String)
1786
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
1787
- # * :first_name (String)
1788
- # * :last_name (String)
1789
- # * :organization_name (String)
1790
- # * :place_of_service_code_as_submitted (CandidApiClient::Commons::Types::FacilityTypeCode)
1791
- # * :benefits_assigned_to_provider (Boolean)
1792
- # * :prior_authorization_number (String)
1793
- # * :external_id (String)
1794
- # * :date_of_service (Date)
1795
- # * :tag_ids (Array<String>)
1796
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
1797
- # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
1798
- # * :provider_accepts_assignment (Boolean)
1799
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
1800
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
1801
- # * :appointment_type (String)
1802
- # * :end_date_of_service (Date)
1803
- # * :additional_information (String)
1804
- # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
1805
- # * :admission_date (Date)
1806
- # * :discharge_date (Date)
1807
- # * :onset_of_current_illness_or_symptom_date (Date)
1808
- # * :last_menstrual_period_date (Date)
1809
- # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
1810
- # * :patient_authorized_release (Boolean)
1811
- # * :referral_number (String)
1812
- # * :secondary_payer_carrier_code (String)
1813
- # @param request_options [CandidApiClient::RequestOptions]
1814
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1815
- # @example
1816
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1817
- # api.encounters.v_4.update(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { })
1818
- def update(encounter_id:, request:, request_options: nil)
1819
- response = @request_client.conn.patch do |req|
1820
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1821
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1822
- req.headers = {
1823
- **(req.headers || {}),
1824
- **@request_client.get_headers,
1825
- **(request_options&.additional_headers || {})
1826
- }.compact
1827
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
1828
- req.url "#{@request_client.get_url(environment: CandidApi,
1829
- request_options: request_options)}/api/encounters/v4/#{encounter_id}"
1830
- end
1831
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
1832
- end
1833
- end
1834
-
1835
- class AsyncV4Client
1836
- # @return [CandidApiClient::AsyncRequestClient]
1837
- attr_reader :request_client
1838
-
1839
- # @param request_client [CandidApiClient::AsyncRequestClient]
1840
- # @return [CandidApiClient::Encounters::V4::AsyncV4Client]
1841
- def initialize(request_client:)
1842
- @request_client = request_client
1843
- end
1844
-
1845
- # @param limit [Integer] Maximum number of entities per page, defaults to 100.
1846
- # @param claim_status [CandidApiClient::Claims::Types::ClaimStatus] Indicates the current status of an insurance claim within the billing process.
1847
- # @param sort [CandidApiClient::Encounters::V4::Types::EncounterSortOptions] Defaults to created_at:desc.
1848
- # @param page_token [String]
1849
- # @param date_of_service_min [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
1850
- # @param date_of_service_max [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
1851
- # @param primary_payer_names [String] Comma delimited string.
1852
- # @param search_term [String] Filter by any of the following fields: encounter_id, claim_id, patient
1853
- # external_id,
1854
- # patient date of birth, patient first name, patient last name,
1855
- # or encounter external id.
1856
- # @param external_id [String] Filter to an exact match on encounter external_id, if one exists.
1857
- # @param diagnoses_updated_since [DateTime] ISO 8601 timestamp; ideally in UTC (although not required):
1858
- # 2019-08-24T14:15:22Z.
1859
- # @param tag_ids [String] Filter by name of tags on encounters.
1860
- # @param work_queue_id [String]
1861
- # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
1862
- # Examples for when this should be set to NOT_BILLABLE include if the Encounter
1863
- # has not occurred yet or if there is no intention of ever billing the
1864
- # responsible_party.
1865
- # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
1866
- # SELF_PAY if you intend to bill self pay/cash pay.
1867
- # @param owner_of_next_action [CandidApiClient::Encounters::V4::Types::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as
1868
- # defined by ownership of open Tasks.
1869
- # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
1870
- # @param request_options [CandidApiClient::RequestOptions]
1871
- # @return [CandidApiClient::Encounters::V4::Types::EncounterPage]
1872
- # @example
1873
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1874
- # api.encounters.v_4.get_all(
1875
- # limit: 100,
1876
- # claim_status: BILLER_RECEIVED,
1877
- # sort: CREATED_AT_ASC,
1878
- # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
1879
- # date_of_service_min: DateTime.parse(2019-08-24),
1880
- # date_of_service_max: DateTime.parse(2019-08-25),
1881
- # primary_payer_names: "Medicare,Medicaid",
1882
- # search_term: "doe",
1883
- # external_id: "123456",
1884
- # diagnoses_updated_since: DateTime.parse(2019-08-24T14:15:22.000Z)
1885
- # )
1886
- def get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil,
1887
- date_of_service_max: nil, primary_payer_names: nil, search_term: nil, external_id: nil, diagnoses_updated_since: nil, tag_ids: nil, work_queue_id: nil, billable_status: nil, responsible_party: nil, owner_of_next_action: nil, patient_external_id: nil, request_options: nil)
1888
- Async do
1889
- response = @request_client.conn.get do |req|
1890
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1891
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1892
- req.headers = {
1893
- **(req.headers || {}),
1894
- **@request_client.get_headers,
1895
- **(request_options&.additional_headers || {})
1896
- }.compact
1897
- req.params = {
1898
- **(request_options&.additional_query_parameters || {}),
1899
- "limit": limit,
1900
- "claim_status": claim_status,
1901
- "sort": sort,
1902
- "page_token": page_token,
1903
- "date_of_service_min": date_of_service_min,
1904
- "date_of_service_max": date_of_service_max,
1905
- "primary_payer_names": primary_payer_names,
1906
- "search_term": search_term,
1907
- "external_id": external_id,
1908
- "diagnoses_updated_since": diagnoses_updated_since,
1909
- "tag_ids": tag_ids,
1910
- "work_queue_id": work_queue_id,
1911
- "billable_status": billable_status,
1912
- "responsible_party": responsible_party,
1913
- "owner_of_next_action": owner_of_next_action,
1914
- "patient_external_id": patient_external_id
1915
- }.compact
1916
- req.url "#{@request_client.get_url(environment: CandidApi,
1917
- request_options: request_options)}/api/encounters/v4"
1918
- end
1919
- CandidApiClient::Encounters::V4::Types::EncounterPage.from_json(json_object: response.body)
1920
- end
1921
- end
1922
-
1923
- # @param encounter_id [String]
1924
- # @param request_options [CandidApiClient::RequestOptions]
1925
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1926
- # @example
1927
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1928
- # api.encounters.v_4.get(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
1929
- def get(encounter_id:, request_options: nil)
1930
- Async do
1931
- response = @request_client.conn.get do |req|
1932
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1933
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1934
- req.headers = {
1935
- **(req.headers || {}),
1936
- **@request_client.get_headers,
1937
- **(request_options&.additional_headers || {})
1938
- }.compact
1939
- req.url "#{@request_client.get_url(environment: CandidApi,
1940
- request_options: request_options)}/api/encounters/v4/#{encounter_id}"
1941
- end
1942
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
1943
- end
1944
- end
1945
-
1946
- # @param request [Hash] Request of type CandidApiClient::EncountersUniversal::Types::UniversalEncounterCreate, as a Hash
1947
- # * :billing_provider (Hash)
1948
- # * :address (Hash)
1949
- # * :zip_plus_four_code (String)
1950
- # * :address_1 (String)
1951
- # * :address_2 (String)
1952
- # * :city (String)
1953
- # * :state (CandidApiClient::Commons::Types::State)
1954
- # * :zip_code (String)
1955
- # * :tax_id (String)
1956
- # * :npi (String)
1957
- # * :taxonomy_code (String)
1958
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
1959
- # * :first_name (String)
1960
- # * :last_name (String)
1961
- # * :organization_name (String)
1962
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
1963
- # * :rendering_provider (Hash)
1964
- # * :npi (String)
1965
- # * :taxonomy_code (String)
1966
- # * :address (Hash)
1967
- # * :zip_plus_four_code (String)
1968
- # * :address_1 (String)
1969
- # * :address_2 (String)
1970
- # * :city (String)
1971
- # * :state (CandidApiClient::Commons::Types::State)
1972
- # * :zip_code (String)
1973
- # * :first_name (String)
1974
- # * :last_name (String)
1975
- # * :organization_name (String)
1976
- # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreate>)
1977
- # * :health_care_code_information (Hash)
1978
- # * :principal_diagnosis (Hash)
1979
- # * :principal_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisCodeQualifier)
1980
- # * :primary_diagnosis_code (String)
1981
- # * :present_on_admission_indicator (CandidApiClient::HealthCareCodeInformation::V1::Types::PresentOnAdmissionIndicatorCode)
1982
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
1983
- # * :industry_code_1 (String)
1984
- # * :industry_code_2 (String)
1985
- # * :industry_code_3 (String)
1986
- # * :industry_code_4 (String)
1987
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
1988
- # * :date_time_period (String)
1989
- # * :monetary_amount (String)
1990
- # * :quantity (String)
1991
- # * :admitting_diagnosis (Hash)
1992
- # * :admitting_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisCodeQualifier)
1993
- # * :admitting_diagnosis_code (String)
1994
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
1995
- # * :industry_code_1 (String)
1996
- # * :industry_code_2 (String)
1997
- # * :industry_code_3 (String)
1998
- # * :industry_code_4 (String)
1999
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
2000
- # * :date_time_period (String)
2001
- # * :monetary_amount (String)
2002
- # * :quantity (String)
2003
- # * :patient_reasons_for_visit (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitNew>)
2004
- # * :external_causes_of_injury (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ExternalCauseOfInjuryNew>)
2005
- # * :diagnosis_related_groups (Hash)
2006
- # * :diagnosis_related_group_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupCodeQualifier)
2007
- # * :diagnosis_related_group_code (String)
2008
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
2009
- # * :industry_code_1 (String)
2010
- # * :industry_code_2 (String)
2011
- # * :industry_code_3 (String)
2012
- # * :industry_code_4 (String)
2013
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
2014
- # * :date_time_period (String)
2015
- # * :monetary_amount (String)
2016
- # * :quantity (String)
2017
- # * :other_diagnosis_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherDiagnosisInformationNew>)
2018
- # * :principal_procedure (Hash)
2019
- # * :principal_procedure_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationCodeQualifier)
2020
- # * :principal_procedure_code (String)
2021
- # * :procedure_date (DateTime)
2022
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
2023
- # * :industry_code_1 (String)
2024
- # * :industry_code_2 (String)
2025
- # * :industry_code_3 (String)
2026
- # * :industry_code_4 (String)
2027
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
2028
- # * :date_time_period (String)
2029
- # * :monetary_amount (String)
2030
- # * :quantity (String)
2031
- # * :other_procedure_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationNew>)
2032
- # * :occurrence_span_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformationNew>)
2033
- # * :occurrence_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationNew>)
2034
- # * :treatment_code_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::TreatmentCodeInformationNew>)
2035
- # * :value_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ValueInformationNew>)
2036
- # * :condition_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ConditionInformationNew>)
2037
- # * :submission_expectation (CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation)
2038
- # * :attending_provider (Hash)
2039
- # * :npi (String)
2040
- # * :taxonomy_code (String)
2041
- # * :address (Hash)
2042
- # * :zip_plus_four_code (String)
2043
- # * :address_1 (String)
2044
- # * :address_2 (String)
2045
- # * :city (String)
2046
- # * :state (CandidApiClient::Commons::Types::State)
2047
- # * :zip_code (String)
2048
- # * :first_name (String)
2049
- # * :last_name (String)
2050
- # * :organization_name (String)
2051
- # * :admission_hour (Integer)
2052
- # * :admission_type_code (CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode)
2053
- # * :admission_source_code (CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode)
2054
- # * :discharge_hour (Integer)
2055
- # * :discharge_status (CandidApiClient::X12::V1::Types::PatientDischargeStatusCode)
2056
- # * :operating_provider (Hash)
2057
- # * :npi (String)
2058
- # * :taxonomy_code (String)
2059
- # * :address (Hash)
2060
- # * :zip_plus_four_code (String)
2061
- # * :address_1 (String)
2062
- # * :address_2 (String)
2063
- # * :city (String)
2064
- # * :state (CandidApiClient::Commons::Types::State)
2065
- # * :zip_code (String)
2066
- # * :first_name (String)
2067
- # * :last_name (String)
2068
- # * :organization_name (String)
2069
- # * :other_operating_provider (Hash)
2070
- # * :npi (String)
2071
- # * :taxonomy_code (String)
2072
- # * :address (Hash)
2073
- # * :zip_plus_four_code (String)
2074
- # * :address_1 (String)
2075
- # * :address_2 (String)
2076
- # * :city (String)
2077
- # * :state (CandidApiClient::Commons::Types::State)
2078
- # * :zip_code (String)
2079
- # * :first_name (String)
2080
- # * :last_name (String)
2081
- # * :organization_name (String)
2082
- # * :type_of_bill (Hash)
2083
- # * :accident_state_or_province_code (CandidApiClient::Commons::Types::State)
2084
- # * :patient (Hash)
2085
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
2086
- # * :phone_consent (Boolean)
2087
- # * :email (String)
2088
- # * :non_insurance_payers (Array<String>)
2089
- # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
2090
- # * :email_consent (Boolean)
2091
- # * :external_id (String)
2092
- # * :date_of_birth (Date)
2093
- # * :address (Hash)
2094
- # * :zip_plus_four_code (String)
2095
- # * :address_1 (String)
2096
- # * :address_2 (String)
2097
- # * :city (String)
2098
- # * :state (CandidApiClient::Commons::Types::State)
2099
- # * :zip_code (String)
2100
- # * :first_name (String)
2101
- # * :last_name (String)
2102
- # * :gender (CandidApiClient::Individual::Types::Gender)
2103
- # * :referring_provider (Hash)
2104
- # * :npi (String)
2105
- # * :taxonomy_code (String)
2106
- # * :address (Hash)
2107
- # * :zip_plus_four_code (String)
2108
- # * :address_1 (String)
2109
- # * :address_2 (String)
2110
- # * :city (String)
2111
- # * :state (CandidApiClient::Commons::Types::State)
2112
- # * :zip_code (String)
2113
- # * :first_name (String)
2114
- # * :last_name (String)
2115
- # * :organization_name (String)
2116
- # * :initial_referring_provider (Hash)
2117
- # * :npi (String)
2118
- # * :taxonomy_code (String)
2119
- # * :address (Hash)
2120
- # * :zip_plus_four_code (String)
2121
- # * :address_1 (String)
2122
- # * :address_2 (String)
2123
- # * :city (String)
2124
- # * :state (CandidApiClient::Commons::Types::State)
2125
- # * :zip_code (String)
2126
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
2127
- # * :first_name (String)
2128
- # * :last_name (String)
2129
- # * :organization_name (String)
2130
- # * :supervising_provider (Hash)
2131
- # * :npi (String)
2132
- # * :taxonomy_code (String)
2133
- # * :address (Hash)
2134
- # * :zip_plus_four_code (String)
2135
- # * :address_1 (String)
2136
- # * :address_2 (String)
2137
- # * :city (String)
2138
- # * :state (CandidApiClient::Commons::Types::State)
2139
- # * :zip_code (String)
2140
- # * :first_name (String)
2141
- # * :last_name (String)
2142
- # * :organization_name (String)
2143
- # * :service_facility (Hash)
2144
- # * :organization_name (String)
2145
- # * :npi (String)
2146
- # * :address (Hash)
2147
- # * :zip_plus_four_code (String)
2148
- # * :address_1 (String)
2149
- # * :address_2 (String)
2150
- # * :city (String)
2151
- # * :state (CandidApiClient::Commons::Types::State)
2152
- # * :zip_code (String)
2153
- # * :secondary_identification (String)
2154
- # * :subscriber_primary (Hash)
2155
- # * :insurance_card (Hash)
2156
- # * :member_id (String)
2157
- # * :payer_name (String)
2158
- # * :payer_id (String)
2159
- # * :rx_bin (String)
2160
- # * :rx_pcn (String)
2161
- # * :image_url_front (String)
2162
- # * :image_url_back (String)
2163
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
2164
- # * :group_number (String)
2165
- # * :plan_name (String)
2166
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
2167
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
2168
- # * :payer_plan_group_id (String)
2169
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
2170
- # * :date_of_birth (Date)
2171
- # * :address (Hash)
2172
- # * :zip_plus_four_code (String)
2173
- # * :address_1 (String)
2174
- # * :address_2 (String)
2175
- # * :city (String)
2176
- # * :state (CandidApiClient::Commons::Types::State)
2177
- # * :zip_code (String)
2178
- # * :first_name (String)
2179
- # * :last_name (String)
2180
- # * :gender (CandidApiClient::Individual::Types::Gender)
2181
- # * :subscriber_secondary (Hash)
2182
- # * :insurance_card (Hash)
2183
- # * :member_id (String)
2184
- # * :payer_name (String)
2185
- # * :payer_id (String)
2186
- # * :rx_bin (String)
2187
- # * :rx_pcn (String)
2188
- # * :image_url_front (String)
2189
- # * :image_url_back (String)
2190
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
2191
- # * :group_number (String)
2192
- # * :plan_name (String)
2193
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
2194
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
2195
- # * :payer_plan_group_id (String)
2196
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
2197
- # * :date_of_birth (Date)
2198
- # * :address (Hash)
2199
- # * :zip_plus_four_code (String)
2200
- # * :address_1 (String)
2201
- # * :address_2 (String)
2202
- # * :city (String)
2203
- # * :state (CandidApiClient::Commons::Types::State)
2204
- # * :zip_code (String)
2205
- # * :first_name (String)
2206
- # * :last_name (String)
2207
- # * :gender (CandidApiClient::Individual::Types::Gender)
2208
- # * :subscriber_tertiary (Hash)
2209
- # * :insurance_card (Hash)
2210
- # * :member_id (String)
2211
- # * :payer_name (String)
2212
- # * :payer_id (String)
2213
- # * :rx_bin (String)
2214
- # * :rx_pcn (String)
2215
- # * :image_url_front (String)
2216
- # * :image_url_back (String)
2217
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
2218
- # * :group_number (String)
2219
- # * :plan_name (String)
2220
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
2221
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
2222
- # * :payer_plan_group_id (String)
2223
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
2224
- # * :date_of_birth (Date)
2225
- # * :address (Hash)
2226
- # * :zip_plus_four_code (String)
2227
- # * :address_1 (String)
2228
- # * :address_2 (String)
2229
- # * :city (String)
2230
- # * :state (CandidApiClient::Commons::Types::State)
2231
- # * :zip_code (String)
2232
- # * :first_name (String)
2233
- # * :last_name (String)
2234
- # * :gender (CandidApiClient::Individual::Types::Gender)
2235
- # * :prior_authorization_number (String)
2236
- # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
2237
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
2238
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
2239
- # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
2240
- # * :guarantor (Hash)
2241
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
2242
- # * :phone_consent (Boolean)
2243
- # * :email (String)
2244
- # * :email_consent (Boolean)
2245
- # * :first_name (String)
2246
- # * :last_name (String)
2247
- # * :external_id (String)
2248
- # * :date_of_birth (Date)
2249
- # * :address (Hash)
2250
- # * :zip_plus_four_code (String)
2251
- # * :address_1 (String)
2252
- # * :address_2 (String)
2253
- # * :city (String)
2254
- # * :state (CandidApiClient::Commons::Types::State)
2255
- # * :zip_code (String)
2256
- # * :external_claim_submission (Hash)
2257
- # * :claim_created_at (DateTime)
2258
- # * :patient_control_number (String)
2259
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
2260
- # * :tag_ids (Array<String>)
2261
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
2262
- # * :referral_number (String)
2263
- # * :epsdt_referral (Hash)
2264
- # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
2265
- # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
2266
- # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
2267
- # * :claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>)
2268
- # * :secondary_payer_carrier_code (String)
2269
- # * :external_id (String)
2270
- # * :date_of_service (Date)
2271
- # * :end_date_of_service (Date)
2272
- # * :patient_authorized_release (Boolean)
2273
- # * :benefits_assigned_to_provider (Boolean)
2274
- # * :provider_accepts_assignment (Boolean)
2275
- # * :appointment_type (String)
2276
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
2277
- # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
2278
- # * :pay_to_address (Hash)
2279
- # * :zip_plus_four_code (String)
2280
- # * :address_1 (String)
2281
- # * :address_2 (String)
2282
- # * :city (String)
2283
- # * :state (CandidApiClient::Commons::Types::State)
2284
- # * :zip_code (String)
2285
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
2286
- # * :vitals (Hash)
2287
- # * :height_in (Integer)
2288
- # * :weight_lbs (Integer)
2289
- # * :blood_pressure_systolic_mmhg (Integer)
2290
- # * :blood_pressure_diastolic_mmhg (Integer)
2291
- # * :body_temperature_f (Float)
2292
- # * :hemoglobin_gdl (Float)
2293
- # * :hematocrit_pct (Float)
2294
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
2295
- # * :additional_information (String)
2296
- # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
2297
- # * :admission_date (Date)
2298
- # * :discharge_date (Date)
2299
- # * :onset_of_current_illness_or_symptom_date (Date)
2300
- # * :last_menstrual_period_date (Date)
2301
- # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
2302
- # @param request_options [CandidApiClient::RequestOptions]
2303
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
2304
- # @example
2305
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
2306
- # api.encounters.v_4.create_universal(request: { external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE, patient: { first_name: "first_name", last_name: "last_name", gender: MALE, external_id: "external_id", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code" } }, responsible_party: INSURANCE_PAY, billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" }, submission_expectation: TARGET_PROFESSIONAL })
2307
- def create_universal(request:, request_options: nil)
2308
- Async do
2309
- response = @request_client.conn.post do |req|
2310
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
2311
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
2312
- req.headers = {
2313
- **(req.headers || {}),
2314
- **@request_client.get_headers,
2315
- **(request_options&.additional_headers || {})
2316
- }.compact
2317
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
2318
- req.url "#{@request_client.get_url(environment: CandidApi,
2319
- request_options: request_options)}/api/encounters/v4/universal"
2320
- end
2321
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
2322
- end
2323
- end
2324
-
2325
- # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreate, as a Hash
2326
- # * :billing_provider (Hash)
2327
- # * :address (Hash)
2328
- # * :zip_plus_four_code (String)
2329
- # * :address_1 (String)
2330
- # * :address_2 (String)
2331
- # * :city (String)
2332
- # * :state (CandidApiClient::Commons::Types::State)
2333
- # * :zip_code (String)
2334
- # * :tax_id (String)
2335
- # * :npi (String)
2336
- # * :taxonomy_code (String)
2337
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
2338
- # * :first_name (String)
2339
- # * :last_name (String)
2340
- # * :organization_name (String)
2341
- # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
2342
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
2343
- # * :rendering_provider (Hash)
2344
- # * :npi (String)
2345
- # * :taxonomy_code (String)
2346
- # * :address (Hash)
2347
- # * :zip_plus_four_code (String)
2348
- # * :address_1 (String)
2349
- # * :address_2 (String)
2350
- # * :city (String)
2351
- # * :state (CandidApiClient::Commons::Types::State)
2352
- # * :zip_code (String)
2353
- # * :first_name (String)
2354
- # * :last_name (String)
2355
- # * :organization_name (String)
2356
- # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
2357
- # * :patient (Hash)
2358
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
2359
- # * :phone_consent (Boolean)
2360
- # * :email (String)
2361
- # * :non_insurance_payers (Array<String>)
2362
- # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
2363
- # * :email_consent (Boolean)
2364
- # * :external_id (String)
2365
- # * :date_of_birth (Date)
2366
- # * :address (Hash)
2367
- # * :zip_plus_four_code (String)
2368
- # * :address_1 (String)
2369
- # * :address_2 (String)
2370
- # * :city (String)
2371
- # * :state (CandidApiClient::Commons::Types::State)
2372
- # * :zip_code (String)
2373
- # * :first_name (String)
2374
- # * :last_name (String)
2375
- # * :gender (CandidApiClient::Individual::Types::Gender)
2376
- # * :referring_provider (Hash)
2377
- # * :npi (String)
2378
- # * :taxonomy_code (String)
2379
- # * :address (Hash)
2380
- # * :zip_plus_four_code (String)
2381
- # * :address_1 (String)
2382
- # * :address_2 (String)
2383
- # * :city (String)
2384
- # * :state (CandidApiClient::Commons::Types::State)
2385
- # * :zip_code (String)
2386
- # * :first_name (String)
2387
- # * :last_name (String)
2388
- # * :organization_name (String)
2389
- # * :initial_referring_provider (Hash)
2390
- # * :npi (String)
2391
- # * :taxonomy_code (String)
2392
- # * :address (Hash)
2393
- # * :zip_plus_four_code (String)
2394
- # * :address_1 (String)
2395
- # * :address_2 (String)
2396
- # * :city (String)
2397
- # * :state (CandidApiClient::Commons::Types::State)
2398
- # * :zip_code (String)
2399
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
2400
- # * :first_name (String)
2401
- # * :last_name (String)
2402
- # * :organization_name (String)
2403
- # * :supervising_provider (Hash)
2404
- # * :npi (String)
2405
- # * :taxonomy_code (String)
2406
- # * :address (Hash)
2407
- # * :zip_plus_four_code (String)
2408
- # * :address_1 (String)
2409
- # * :address_2 (String)
2410
- # * :city (String)
2411
- # * :state (CandidApiClient::Commons::Types::State)
2412
- # * :zip_code (String)
2413
- # * :first_name (String)
2414
- # * :last_name (String)
2415
- # * :organization_name (String)
2416
- # * :service_facility (Hash)
2417
- # * :organization_name (String)
2418
- # * :npi (String)
2419
- # * :address (Hash)
2420
- # * :zip_plus_four_code (String)
2421
- # * :address_1 (String)
2422
- # * :address_2 (String)
2423
- # * :city (String)
2424
- # * :state (CandidApiClient::Commons::Types::State)
2425
- # * :zip_code (String)
2426
- # * :secondary_identification (String)
2427
- # * :subscriber_primary (Hash)
2428
- # * :insurance_card (Hash)
2429
- # * :member_id (String)
2430
- # * :payer_name (String)
2431
- # * :payer_id (String)
2432
- # * :rx_bin (String)
2433
- # * :rx_pcn (String)
2434
- # * :image_url_front (String)
2435
- # * :image_url_back (String)
2436
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
2437
- # * :group_number (String)
2438
- # * :plan_name (String)
2439
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
2440
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
2441
- # * :payer_plan_group_id (String)
2442
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
2443
- # * :date_of_birth (Date)
2444
- # * :address (Hash)
2445
- # * :zip_plus_four_code (String)
2446
- # * :address_1 (String)
2447
- # * :address_2 (String)
2448
- # * :city (String)
2449
- # * :state (CandidApiClient::Commons::Types::State)
2450
- # * :zip_code (String)
2451
- # * :first_name (String)
2452
- # * :last_name (String)
2453
- # * :gender (CandidApiClient::Individual::Types::Gender)
2454
- # * :subscriber_secondary (Hash)
2455
- # * :insurance_card (Hash)
2456
- # * :member_id (String)
2457
- # * :payer_name (String)
2458
- # * :payer_id (String)
2459
- # * :rx_bin (String)
2460
- # * :rx_pcn (String)
2461
- # * :image_url_front (String)
2462
- # * :image_url_back (String)
2463
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
2464
- # * :group_number (String)
2465
- # * :plan_name (String)
2466
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
2467
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
2468
- # * :payer_plan_group_id (String)
2469
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
2470
- # * :date_of_birth (Date)
2471
- # * :address (Hash)
2472
- # * :zip_plus_four_code (String)
2473
- # * :address_1 (String)
2474
- # * :address_2 (String)
2475
- # * :city (String)
2476
- # * :state (CandidApiClient::Commons::Types::State)
2477
- # * :zip_code (String)
2478
- # * :first_name (String)
2479
- # * :last_name (String)
2480
- # * :gender (CandidApiClient::Individual::Types::Gender)
2481
- # * :subscriber_tertiary (Hash)
2482
- # * :insurance_card (Hash)
2483
- # * :member_id (String)
2484
- # * :payer_name (String)
2485
- # * :payer_id (String)
2486
- # * :rx_bin (String)
2487
- # * :rx_pcn (String)
2488
- # * :image_url_front (String)
2489
- # * :image_url_back (String)
2490
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
2491
- # * :group_number (String)
2492
- # * :plan_name (String)
2493
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
2494
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
2495
- # * :payer_plan_group_id (String)
2496
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
2497
- # * :date_of_birth (Date)
2498
- # * :address (Hash)
2499
- # * :zip_plus_four_code (String)
2500
- # * :address_1 (String)
2501
- # * :address_2 (String)
2502
- # * :city (String)
2503
- # * :state (CandidApiClient::Commons::Types::State)
2504
- # * :zip_code (String)
2505
- # * :first_name (String)
2506
- # * :last_name (String)
2507
- # * :gender (CandidApiClient::Individual::Types::Gender)
2508
- # * :prior_authorization_number (String)
2509
- # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
2510
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
2511
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
2512
- # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
2513
- # * :guarantor (Hash)
2514
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
2515
- # * :phone_consent (Boolean)
2516
- # * :email (String)
2517
- # * :email_consent (Boolean)
2518
- # * :first_name (String)
2519
- # * :last_name (String)
2520
- # * :external_id (String)
2521
- # * :date_of_birth (Date)
2522
- # * :address (Hash)
2523
- # * :zip_plus_four_code (String)
2524
- # * :address_1 (String)
2525
- # * :address_2 (String)
2526
- # * :city (String)
2527
- # * :state (CandidApiClient::Commons::Types::State)
2528
- # * :zip_code (String)
2529
- # * :external_claim_submission (Hash)
2530
- # * :claim_created_at (DateTime)
2531
- # * :patient_control_number (String)
2532
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
2533
- # * :tag_ids (Array<String>)
2534
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
2535
- # * :referral_number (String)
2536
- # * :epsdt_referral (Hash)
2537
- # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
2538
- # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
2539
- # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
2540
- # * :claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>)
2541
- # * :secondary_payer_carrier_code (String)
2542
- # * :external_id (String)
2543
- # * :date_of_service (Date)
2544
- # * :end_date_of_service (Date)
2545
- # * :patient_authorized_release (Boolean)
2546
- # * :benefits_assigned_to_provider (Boolean)
2547
- # * :provider_accepts_assignment (Boolean)
2548
- # * :appointment_type (String)
2549
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
2550
- # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
2551
- # * :pay_to_address (Hash)
2552
- # * :zip_plus_four_code (String)
2553
- # * :address_1 (String)
2554
- # * :address_2 (String)
2555
- # * :city (String)
2556
- # * :state (CandidApiClient::Commons::Types::State)
2557
- # * :zip_code (String)
2558
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
2559
- # * :vitals (Hash)
2560
- # * :height_in (Integer)
2561
- # * :weight_lbs (Integer)
2562
- # * :blood_pressure_systolic_mmhg (Integer)
2563
- # * :blood_pressure_diastolic_mmhg (Integer)
2564
- # * :body_temperature_f (Float)
2565
- # * :hemoglobin_gdl (Float)
2566
- # * :hematocrit_pct (Float)
2567
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
2568
- # * :additional_information (String)
2569
- # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
2570
- # * :admission_date (Date)
2571
- # * :discharge_date (Date)
2572
- # * :onset_of_current_illness_or_symptom_date (Date)
2573
- # * :last_menstrual_period_date (Date)
2574
- # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
2575
- # @param request_options [CandidApiClient::RequestOptions]
2576
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
2577
- # @example
2578
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
2579
- # api.encounters.v_4.create(request: { external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE, patient: { first_name: "first_name", last_name: "last_name", gender: MALE, external_id: "external_id", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code" } }, responsible_party: INSURANCE_PAY, billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" }, diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }], place_of_service_code: PHARMACY, rendering_provider: { npi: "npi" } })
2580
- def create(request:, request_options: nil)
2581
- Async do
2582
- response = @request_client.conn.post do |req|
2583
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
2584
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
2585
- req.headers = {
2586
- **(req.headers || {}),
2587
- **@request_client.get_headers,
2588
- **(request_options&.additional_headers || {})
2589
- }.compact
2590
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
2591
- req.url "#{@request_client.get_url(environment: CandidApi,
2592
- request_options: request_options)}/api/encounters/v4"
2593
- end
2594
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
2595
- end
2596
- end
2597
-
2598
- # Create an encounter from a pre-encounter patient and appointment. This endpoint
2599
- # is intended to be used by consumers who are managing
2600
- # patients and appointments in the pre-encounter service and is currently under
2601
- # development. Consumers who are not taking advantage
2602
- # of the pre-encounter service should use the standard create endpoint.
2603
- # The endpoint will create an encounter from the provided fields, pulling
2604
- # information from the provided patient and appointment objects
2605
- # where applicable. In particular, the following fields are populated from the
2606
- # patient and appointment objects:
2607
- # - Patient
2608
- # - Referring Provider
2609
- # - Subscriber Primary
2610
- # - Subscriber Secondary
2611
- # - Referral Number
2612
- # - Responsible Party
2613
- # - Guarantor
2614
- # Utilizing this endpoint opts you into automatic updating of the encounter when
2615
- # the patient or appointment is updated, assuming the
2616
- # encounter has not already been submitted or adjudicated.
2617
- #
2618
- # @param request [Hash] Request of type CandidApiClient::EncountersUniversal::Types::UniversalEncounterCreateFromPreEncounter, as a Hash
2619
- # * :submission_expectation (CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation)
2620
- # * :rendering_provider (Hash)
2621
- # * :npi (String)
2622
- # * :taxonomy_code (String)
2623
- # * :address (Hash)
2624
- # * :zip_plus_four_code (String)
2625
- # * :address_1 (String)
2626
- # * :address_2 (String)
2627
- # * :city (String)
2628
- # * :state (CandidApiClient::Commons::Types::State)
2629
- # * :zip_code (String)
2630
- # * :first_name (String)
2631
- # * :last_name (String)
2632
- # * :organization_name (String)
2633
- # * :health_care_code_information (Hash)
2634
- # * :principal_diagnosis (Hash)
2635
- # * :principal_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisCodeQualifier)
2636
- # * :primary_diagnosis_code (String)
2637
- # * :present_on_admission_indicator (CandidApiClient::HealthCareCodeInformation::V1::Types::PresentOnAdmissionIndicatorCode)
2638
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
2639
- # * :industry_code_1 (String)
2640
- # * :industry_code_2 (String)
2641
- # * :industry_code_3 (String)
2642
- # * :industry_code_4 (String)
2643
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
2644
- # * :date_time_period (String)
2645
- # * :monetary_amount (String)
2646
- # * :quantity (String)
2647
- # * :admitting_diagnosis (Hash)
2648
- # * :admitting_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisCodeQualifier)
2649
- # * :admitting_diagnosis_code (String)
2650
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
2651
- # * :industry_code_1 (String)
2652
- # * :industry_code_2 (String)
2653
- # * :industry_code_3 (String)
2654
- # * :industry_code_4 (String)
2655
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
2656
- # * :date_time_period (String)
2657
- # * :monetary_amount (String)
2658
- # * :quantity (String)
2659
- # * :patient_reasons_for_visit (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitNew>)
2660
- # * :external_causes_of_injury (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ExternalCauseOfInjuryNew>)
2661
- # * :diagnosis_related_groups (Hash)
2662
- # * :diagnosis_related_group_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupCodeQualifier)
2663
- # * :diagnosis_related_group_code (String)
2664
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
2665
- # * :industry_code_1 (String)
2666
- # * :industry_code_2 (String)
2667
- # * :industry_code_3 (String)
2668
- # * :industry_code_4 (String)
2669
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
2670
- # * :date_time_period (String)
2671
- # * :monetary_amount (String)
2672
- # * :quantity (String)
2673
- # * :other_diagnosis_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherDiagnosisInformationNew>)
2674
- # * :principal_procedure (Hash)
2675
- # * :principal_procedure_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationCodeQualifier)
2676
- # * :principal_procedure_code (String)
2677
- # * :procedure_date (DateTime)
2678
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
2679
- # * :industry_code_1 (String)
2680
- # * :industry_code_2 (String)
2681
- # * :industry_code_3 (String)
2682
- # * :industry_code_4 (String)
2683
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
2684
- # * :date_time_period (String)
2685
- # * :monetary_amount (String)
2686
- # * :quantity (String)
2687
- # * :other_procedure_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationNew>)
2688
- # * :occurrence_span_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformationNew>)
2689
- # * :occurrence_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationNew>)
2690
- # * :treatment_code_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::TreatmentCodeInformationNew>)
2691
- # * :value_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ValueInformationNew>)
2692
- # * :condition_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ConditionInformationNew>)
2693
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
2694
- # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::UniversalServiceLineCreate>)
2695
- # * :attending_provider (Hash)
2696
- # * :npi (String)
2697
- # * :taxonomy_code (String)
2698
- # * :address (Hash)
2699
- # * :zip_plus_four_code (String)
2700
- # * :address_1 (String)
2701
- # * :address_2 (String)
2702
- # * :city (String)
2703
- # * :state (CandidApiClient::Commons::Types::State)
2704
- # * :zip_code (String)
2705
- # * :first_name (String)
2706
- # * :last_name (String)
2707
- # * :organization_name (String)
2708
- # * :admission_hour (Integer)
2709
- # * :admission_type_code (CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode)
2710
- # * :admission_source_code (CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode)
2711
- # * :discharge_hour (Integer)
2712
- # * :discharge_status (CandidApiClient::X12::V1::Types::PatientDischargeStatusCode)
2713
- # * :operating_provider (Hash)
2714
- # * :npi (String)
2715
- # * :taxonomy_code (String)
2716
- # * :address (Hash)
2717
- # * :zip_plus_four_code (String)
2718
- # * :address_1 (String)
2719
- # * :address_2 (String)
2720
- # * :city (String)
2721
- # * :state (CandidApiClient::Commons::Types::State)
2722
- # * :zip_code (String)
2723
- # * :first_name (String)
2724
- # * :last_name (String)
2725
- # * :organization_name (String)
2726
- # * :other_operating_provider (Hash)
2727
- # * :npi (String)
2728
- # * :taxonomy_code (String)
2729
- # * :address (Hash)
2730
- # * :zip_plus_four_code (String)
2731
- # * :address_1 (String)
2732
- # * :address_2 (String)
2733
- # * :city (String)
2734
- # * :state (CandidApiClient::Commons::Types::State)
2735
- # * :zip_code (String)
2736
- # * :first_name (String)
2737
- # * :last_name (String)
2738
- # * :organization_name (String)
2739
- # * :type_of_bill (Hash)
2740
- # * :accident_state_or_province_code (CandidApiClient::Commons::Types::State)
2741
- # * :pre_encounter_patient_id (String)
2742
- # * :pre_encounter_appointment_ids (Array<String>)
2743
- # * :billing_provider (Hash)
2744
- # * :address (Hash)
2745
- # * :zip_plus_four_code (String)
2746
- # * :address_1 (String)
2747
- # * :address_2 (String)
2748
- # * :city (String)
2749
- # * :state (CandidApiClient::Commons::Types::State)
2750
- # * :zip_code (String)
2751
- # * :tax_id (String)
2752
- # * :npi (String)
2753
- # * :taxonomy_code (String)
2754
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
2755
- # * :first_name (String)
2756
- # * :last_name (String)
2757
- # * :organization_name (String)
2758
- # * :initial_referring_provider (Hash)
2759
- # * :npi (String)
2760
- # * :taxonomy_code (String)
2761
- # * :address (Hash)
2762
- # * :zip_plus_four_code (String)
2763
- # * :address_1 (String)
2764
- # * :address_2 (String)
2765
- # * :city (String)
2766
- # * :state (CandidApiClient::Commons::Types::State)
2767
- # * :zip_code (String)
2768
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
2769
- # * :first_name (String)
2770
- # * :last_name (String)
2771
- # * :organization_name (String)
2772
- # * :supervising_provider (Hash)
2773
- # * :npi (String)
2774
- # * :taxonomy_code (String)
2775
- # * :address (Hash)
2776
- # * :zip_plus_four_code (String)
2777
- # * :address_1 (String)
2778
- # * :address_2 (String)
2779
- # * :city (String)
2780
- # * :state (CandidApiClient::Commons::Types::State)
2781
- # * :zip_code (String)
2782
- # * :first_name (String)
2783
- # * :last_name (String)
2784
- # * :organization_name (String)
2785
- # * :service_facility (Hash)
2786
- # * :organization_name (String)
2787
- # * :npi (String)
2788
- # * :address (Hash)
2789
- # * :zip_plus_four_code (String)
2790
- # * :address_1 (String)
2791
- # * :address_2 (String)
2792
- # * :city (String)
2793
- # * :state (CandidApiClient::Commons::Types::State)
2794
- # * :zip_code (String)
2795
- # * :secondary_identification (String)
2796
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
2797
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
2798
- # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
2799
- # * :external_claim_submission (Hash)
2800
- # * :claim_created_at (DateTime)
2801
- # * :patient_control_number (String)
2802
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
2803
- # * :tag_ids (Array<String>)
2804
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
2805
- # * :external_id (String)
2806
- # * :date_of_service (Date)
2807
- # * :end_date_of_service (Date)
2808
- # * :patient_authorized_release (Boolean)
2809
- # * :benefits_assigned_to_provider (Boolean)
2810
- # * :provider_accepts_assignment (Boolean)
2811
- # * :appointment_type (String)
2812
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
2813
- # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
2814
- # * :pay_to_address (Hash)
2815
- # * :zip_plus_four_code (String)
2816
- # * :address_1 (String)
2817
- # * :address_2 (String)
2818
- # * :city (String)
2819
- # * :state (CandidApiClient::Commons::Types::State)
2820
- # * :zip_code (String)
2821
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
2822
- # * :vitals (Hash)
2823
- # * :height_in (Integer)
2824
- # * :weight_lbs (Integer)
2825
- # * :blood_pressure_systolic_mmhg (Integer)
2826
- # * :blood_pressure_diastolic_mmhg (Integer)
2827
- # * :body_temperature_f (Float)
2828
- # * :hemoglobin_gdl (Float)
2829
- # * :hematocrit_pct (Float)
2830
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
2831
- # * :additional_information (String)
2832
- # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
2833
- # * :admission_date (Date)
2834
- # * :discharge_date (Date)
2835
- # * :onset_of_current_illness_or_symptom_date (Date)
2836
- # * :last_menstrual_period_date (Date)
2837
- # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
823
+ class AsyncV4Client
824
+ # @return [CandidApiClient::AsyncRequestClient]
825
+ attr_reader :request_client
826
+
827
+ # @param request_client [CandidApiClient::AsyncRequestClient]
828
+ # @return [CandidApiClient::Encounters::V4::AsyncV4Client]
829
+ def initialize(request_client:)
830
+ @request_client = request_client
831
+ end
832
+
833
+ # @param limit [Integer] Maximum number of entities per page, defaults to 100.
834
+ # @param claim_status [CandidApiClient::Claims::Types::ClaimStatus] Indicates the current status of an insurance claim within the billing process.
835
+ # @param sort [CandidApiClient::Encounters::V4::Types::EncounterSortOptions] Defaults to created_at:desc.
836
+ # @param page_token [String]
837
+ # @param date_of_service_min [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
838
+ # @param date_of_service_max [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
839
+ # @param primary_payer_names [String] Comma delimited string.
840
+ # @param search_term [String] Filter by any of the following fields: encounter_id, claim_id, patient
841
+ # external_id,
842
+ # patient date of birth, patient first name, patient last name,
843
+ # or encounter external id.
844
+ # @param external_id [String] Filter to an exact match on encounter external_id, if one exists.
845
+ # @param diagnoses_updated_since [DateTime] ISO 8601 timestamp; ideally in UTC (although not required):
846
+ # 2019-08-24T14:15:22Z.
847
+ # @param tag_ids [String] Filter by name of tags on encounters.
848
+ # @param work_queue_id [String]
849
+ # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
850
+ # Examples for when this should be set to NOT_BILLABLE include if the Encounter
851
+ # has not occurred yet or if there is no intention of ever billing the
852
+ # responsible_party.
853
+ # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
854
+ # SELF_PAY if you intend to bill self pay/cash pay.
855
+ # @param owner_of_next_action [CandidApiClient::Encounters::V4::Types::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as
856
+ # defined by ownership of open Tasks.
857
+ # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
858
+ # @param request_options [CandidApiClient::RequestOptions]
859
+ # @return [CandidApiClient::Encounters::V4::Types::EncounterPage]
860
+ # @example
861
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
862
+ # api.encounters.v_4.get_all(
863
+ # limit: 100,
864
+ # claim_status: BILLER_RECEIVED,
865
+ # sort: CREATED_AT_ASC,
866
+ # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
867
+ # date_of_service_min: DateTime.parse(2019-08-24),
868
+ # date_of_service_max: DateTime.parse(2019-08-25),
869
+ # primary_payer_names: "Medicare,Medicaid",
870
+ # search_term: "doe",
871
+ # external_id: "123456",
872
+ # diagnoses_updated_since: DateTime.parse(2019-08-24T14:15:22.000Z)
873
+ # )
874
+ def get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil,
875
+ date_of_service_max: nil, primary_payer_names: nil, search_term: nil, external_id: nil, diagnoses_updated_since: nil, tag_ids: nil, work_queue_id: nil, billable_status: nil, responsible_party: nil, owner_of_next_action: nil, patient_external_id: nil, request_options: nil)
876
+ Async do
877
+ response = @request_client.conn.get do |req|
878
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
879
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
880
+ req.headers = {
881
+ **(req.headers || {}),
882
+ **@request_client.get_headers,
883
+ **(request_options&.additional_headers || {})
884
+ }.compact
885
+ req.params = {
886
+ **(request_options&.additional_query_parameters || {}),
887
+ "limit": limit,
888
+ "claim_status": claim_status,
889
+ "sort": sort,
890
+ "page_token": page_token,
891
+ "date_of_service_min": date_of_service_min,
892
+ "date_of_service_max": date_of_service_max,
893
+ "primary_payer_names": primary_payer_names,
894
+ "search_term": search_term,
895
+ "external_id": external_id,
896
+ "diagnoses_updated_since": diagnoses_updated_since,
897
+ "tag_ids": tag_ids,
898
+ "work_queue_id": work_queue_id,
899
+ "billable_status": billable_status,
900
+ "responsible_party": responsible_party,
901
+ "owner_of_next_action": owner_of_next_action,
902
+ "patient_external_id": patient_external_id
903
+ }.compact
904
+ req.url "#{@request_client.get_url(environment: CandidApi,
905
+ request_options: request_options)}/api/encounters/v4"
906
+ end
907
+ CandidApiClient::Encounters::V4::Types::EncounterPage.from_json(json_object: response.body)
908
+ end
909
+ end
910
+
911
+ # @param encounter_id [String]
2838
912
  # @param request_options [CandidApiClient::RequestOptions]
2839
913
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
2840
914
  # @example
2841
915
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
2842
- # api.encounters.v_4.create_from_pre_encounter_patient_universal(request: { external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE, pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" }, submission_expectation: TARGET_PROFESSIONAL })
2843
- def create_from_pre_encounter_patient_universal(request:, request_options: nil)
916
+ # api.encounters.v_4.get(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
917
+ def get(encounter_id:, request_options: nil)
2844
918
  Async do
2845
- response = @request_client.conn.post do |req|
919
+ response = @request_client.conn.get do |req|
2846
920
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
2847
921
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
2848
922
  req.headers = {
@@ -2850,53 +924,14 @@ module CandidApiClient
2850
924
  **@request_client.get_headers,
2851
925
  **(request_options&.additional_headers || {})
2852
926
  }.compact
2853
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
2854
927
  req.url "#{@request_client.get_url(environment: CandidApi,
2855
- request_options: request_options)}/api/encounters/v4/create-from-pre-encounter/universal"
928
+ request_options: request_options)}/api/encounters/v4/#{encounter_id}"
2856
929
  end
2857
930
  CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
2858
931
  end
2859
932
  end
2860
933
 
2861
- # Create an encounter from a pre-encounter patient and appointment. This endpoint
2862
- # is intended to be used by consumers who are managing
2863
- # patients and appointments in the pre-encounter service and is currently under
2864
- # development. Consumers who are not taking advantage
2865
- # of the pre-encounter service should use the standard create endpoint.
2866
- # The endpoint will create an encounter from the provided fields, pulling
2867
- # information from the provided patient and appointment objects
2868
- # where applicable. In particular, the following fields are populated from the
2869
- # patient and appointment objects:
2870
- # - Patient
2871
- # - Referring Provider
2872
- # - Subscriber Primary
2873
- # - Subscriber Secondary
2874
- # - Referral Number
2875
- # - Responsible Party
2876
- # - Guarantor
2877
- # Utilizing this endpoint opts you into automatic updating of the encounter when
2878
- # the patient or appointment is updated, assuming the
2879
- # encounter has not already been submitted or adjudicated.
2880
- #
2881
- # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreateFromPreEncounter, as a Hash
2882
- # * :rendering_provider (Hash)
2883
- # * :npi (String)
2884
- # * :taxonomy_code (String)
2885
- # * :address (Hash)
2886
- # * :zip_plus_four_code (String)
2887
- # * :address_1 (String)
2888
- # * :address_2 (String)
2889
- # * :city (String)
2890
- # * :state (CandidApiClient::Commons::Types::State)
2891
- # * :zip_code (String)
2892
- # * :first_name (String)
2893
- # * :last_name (String)
2894
- # * :organization_name (String)
2895
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
2896
- # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
2897
- # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
2898
- # * :pre_encounter_patient_id (String)
2899
- # * :pre_encounter_appointment_ids (Array<String>)
934
+ # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreate, as a Hash
2900
935
  # * :billing_provider (Hash)
2901
936
  # * :address (Hash)
2902
937
  # * :zip_plus_four_code (String)
@@ -2912,21 +947,9 @@ module CandidApiClient
2912
947
  # * :first_name (String)
2913
948
  # * :last_name (String)
2914
949
  # * :organization_name (String)
2915
- # * :initial_referring_provider (Hash)
2916
- # * :npi (String)
2917
- # * :taxonomy_code (String)
2918
- # * :address (Hash)
2919
- # * :zip_plus_four_code (String)
2920
- # * :address_1 (String)
2921
- # * :address_2 (String)
2922
- # * :city (String)
2923
- # * :state (CandidApiClient::Commons::Types::State)
2924
- # * :zip_code (String)
2925
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
2926
- # * :first_name (String)
2927
- # * :last_name (String)
2928
- # * :organization_name (String)
2929
- # * :supervising_provider (Hash)
950
+ # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
951
+ # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
952
+ # * :rendering_provider (Hash)
2930
953
  # * :npi (String)
2931
954
  # * :taxonomy_code (String)
2932
955
  # * :address (Hash)
@@ -2939,157 +962,28 @@ module CandidApiClient
2939
962
  # * :first_name (String)
2940
963
  # * :last_name (String)
2941
964
  # * :organization_name (String)
2942
- # * :service_facility (Hash)
2943
- # * :organization_name (String)
2944
- # * :npi (String)
2945
- # * :address (Hash)
2946
- # * :zip_plus_four_code (String)
2947
- # * :address_1 (String)
2948
- # * :address_2 (String)
2949
- # * :city (String)
2950
- # * :state (CandidApiClient::Commons::Types::State)
2951
- # * :zip_code (String)
2952
- # * :secondary_identification (String)
2953
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
2954
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
2955
- # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
2956
- # * :external_claim_submission (Hash)
2957
- # * :claim_created_at (DateTime)
2958
- # * :patient_control_number (String)
2959
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
2960
- # * :tag_ids (Array<String>)
2961
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
2962
- # * :external_id (String)
2963
- # * :date_of_service (Date)
2964
- # * :end_date_of_service (Date)
2965
- # * :patient_authorized_release (Boolean)
2966
- # * :benefits_assigned_to_provider (Boolean)
2967
- # * :provider_accepts_assignment (Boolean)
2968
- # * :appointment_type (String)
2969
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
2970
- # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
2971
- # * :pay_to_address (Hash)
2972
- # * :zip_plus_four_code (String)
2973
- # * :address_1 (String)
2974
- # * :address_2 (String)
2975
- # * :city (String)
2976
- # * :state (CandidApiClient::Commons::Types::State)
2977
- # * :zip_code (String)
2978
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
2979
- # * :vitals (Hash)
2980
- # * :height_in (Integer)
2981
- # * :weight_lbs (Integer)
2982
- # * :blood_pressure_systolic_mmhg (Integer)
2983
- # * :blood_pressure_diastolic_mmhg (Integer)
2984
- # * :body_temperature_f (Float)
2985
- # * :hemoglobin_gdl (Float)
2986
- # * :hematocrit_pct (Float)
2987
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
2988
- # * :additional_information (String)
2989
- # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
2990
- # * :admission_date (Date)
2991
- # * :discharge_date (Date)
2992
- # * :onset_of_current_illness_or_symptom_date (Date)
2993
- # * :last_menstrual_period_date (Date)
2994
- # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
2995
- # @param request_options [CandidApiClient::RequestOptions]
2996
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
2997
- # @example
2998
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
2999
- # api.encounters.v_4.create_from_pre_encounter_patient(request: { external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE, pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" }, rendering_provider: { npi: "npi" }, place_of_service_code: PHARMACY, diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }] })
3000
- def create_from_pre_encounter_patient(request:, request_options: nil)
3001
- Async do
3002
- response = @request_client.conn.post do |req|
3003
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
3004
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
3005
- req.headers = {
3006
- **(req.headers || {}),
3007
- **@request_client.get_headers,
3008
- **(request_options&.additional_headers || {})
3009
- }.compact
3010
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
3011
- req.url "#{@request_client.get_url(environment: CandidApi,
3012
- request_options: request_options)}/api/encounters/v4/create-from-pre-encounter"
3013
- end
3014
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
3015
- end
3016
- end
3017
-
3018
- # @param encounter_id [String]
3019
- # @param request [Hash] Request of type CandidApiClient::EncountersUniversal::Types::UniversalEncounterUpdate, as a Hash
3020
- # * :health_care_code_information (Hash)
3021
- # * :principal_diagnosis (Hash)
3022
- # * :value (Hash)
3023
- # * :principal_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisCodeQualifier)
3024
- # * :primary_diagnosis_code (String)
3025
- # * :present_on_admission_indicator (CandidApiClient::HealthCareCodeInformation::V1::Types::PresentOnAdmissionIndicatorCode)
3026
- # * :id (String)
3027
- # * :encounter_id (String)
3028
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
3029
- # * :industry_code_1 (String)
3030
- # * :industry_code_2 (String)
3031
- # * :industry_code_3 (String)
3032
- # * :industry_code_4 (String)
3033
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
3034
- # * :date_time_period (String)
3035
- # * :monetary_amount (String)
3036
- # * :quantity (String)
3037
- # * :admitting_diagnosis (Hash)
3038
- # * :value (Hash)
3039
- # * :admitting_diagnosis_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisCodeQualifier)
3040
- # * :admitting_diagnosis_code (String)
3041
- # * :id (String)
3042
- # * :encounter_id (String)
3043
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
3044
- # * :industry_code_1 (String)
3045
- # * :industry_code_2 (String)
3046
- # * :industry_code_3 (String)
3047
- # * :industry_code_4 (String)
3048
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
3049
- # * :date_time_period (String)
3050
- # * :monetary_amount (String)
3051
- # * :quantity (String)
3052
- # * :patient_reasons_for_visit (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisit>)
3053
- # * :external_causes_of_injury (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ExternalCauseOfInjury>)
3054
- # * :diagnosis_related_groups (Hash)
3055
- # * :value (Hash)
3056
- # * :diagnosis_related_group_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupCodeQualifier)
3057
- # * :diagnosis_related_group_code (String)
3058
- # * :id (String)
3059
- # * :encounter_id (String)
3060
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
3061
- # * :industry_code_1 (String)
3062
- # * :industry_code_2 (String)
3063
- # * :industry_code_3 (String)
3064
- # * :industry_code_4 (String)
3065
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
3066
- # * :date_time_period (String)
3067
- # * :monetary_amount (String)
3068
- # * :quantity (String)
3069
- # * :other_diagnosis_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherDiagnosisInformation>)
3070
- # * :principal_procedure (Hash)
3071
- # * :value (Hash)
3072
- # * :principal_procedure_code_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationCodeQualifier)
3073
- # * :principal_procedure_code (String)
3074
- # * :procedure_date (DateTime)
3075
- # * :id (String)
3076
- # * :encounter_id (String)
3077
- # * :code_list_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode)
3078
- # * :industry_code_1 (String)
3079
- # * :industry_code_2 (String)
3080
- # * :industry_code_3 (String)
3081
- # * :industry_code_4 (String)
3082
- # * :date_time_period_format_qualifier (CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier)
3083
- # * :date_time_period (String)
3084
- # * :monetary_amount (String)
3085
- # * :quantity (String)
3086
- # * :other_procedure_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformation>)
3087
- # * :occurrence_span_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformation>)
3088
- # * :occurrence_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformation>)
3089
- # * :treatment_code_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::TreatmentCodeInformation>)
3090
- # * :value_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ValueInformation>)
3091
- # * :condition_information (Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ConditionInformation>)
3092
- # * :attending_provider (Hash)
965
+ # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
966
+ # * :patient (Hash)
967
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
968
+ # * :phone_consent (Boolean)
969
+ # * :email (String)
970
+ # * :non_insurance_payers (Array<String>)
971
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
972
+ # * :email_consent (Boolean)
973
+ # * :auto_charge_consent (Boolean)
974
+ # * :external_id (String)
975
+ # * :date_of_birth (Date)
976
+ # * :address (Hash)
977
+ # * :zip_plus_four_code (String)
978
+ # * :address_1 (String)
979
+ # * :address_2 (String)
980
+ # * :city (String)
981
+ # * :state (CandidApiClient::Commons::Types::State)
982
+ # * :zip_code (String)
983
+ # * :first_name (String)
984
+ # * :last_name (String)
985
+ # * :gender (CandidApiClient::Individual::Types::Gender)
986
+ # * :referring_provider (Hash)
3093
987
  # * :npi (String)
3094
988
  # * :taxonomy_code (String)
3095
989
  # * :address (Hash)
@@ -3102,12 +996,7 @@ module CandidApiClient
3102
996
  # * :first_name (String)
3103
997
  # * :last_name (String)
3104
998
  # * :organization_name (String)
3105
- # * :admission_hour (Integer)
3106
- # * :admission_type_code (CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode)
3107
- # * :admission_source_code (CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode)
3108
- # * :discharge_hour (Integer)
3109
- # * :discharge_status (CandidApiClient::X12::V1::Types::PatientDischargeStatusCode)
3110
- # * :operating_provider (Hash)
999
+ # * :initial_referring_provider (Hash)
3111
1000
  # * :npi (String)
3112
1001
  # * :taxonomy_code (String)
3113
1002
  # * :address (Hash)
@@ -3117,10 +1006,11 @@ module CandidApiClient
3117
1006
  # * :city (String)
3118
1007
  # * :state (CandidApiClient::Commons::Types::State)
3119
1008
  # * :zip_code (String)
1009
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
3120
1010
  # * :first_name (String)
3121
1011
  # * :last_name (String)
3122
1012
  # * :organization_name (String)
3123
- # * :other_operating_provider (Hash)
1013
+ # * :supervising_provider (Hash)
3124
1014
  # * :npi (String)
3125
1015
  # * :taxonomy_code (String)
3126
1016
  # * :address (Hash)
@@ -3133,22 +1023,9 @@ module CandidApiClient
3133
1023
  # * :first_name (String)
3134
1024
  # * :last_name (String)
3135
1025
  # * :organization_name (String)
3136
- # * :type_of_bill (Hash)
3137
- # * :accident_state_or_province_code (CandidApiClient::Commons::Types::State)
3138
- # * :submission_expectation (CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation)
3139
- # * :epsdt_referral (Hash)
3140
- # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
3141
- # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
3142
- # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
3143
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
3144
- # * :claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>)
3145
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
3146
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
3147
- # * :guarantor (Hash)
3148
- # * :first_name (String)
3149
- # * :last_name (String)
3150
- # * :external_id (String)
3151
- # * :date_of_birth (Date)
1026
+ # * :service_facility (Hash)
1027
+ # * :organization_name (String)
1028
+ # * :npi (String)
3152
1029
  # * :address (Hash)
3153
1030
  # * :zip_plus_four_code (String)
3154
1031
  # * :address_1 (String)
@@ -3156,10 +1033,7 @@ module CandidApiClient
3156
1033
  # * :city (String)
3157
1034
  # * :state (CandidApiClient::Commons::Types::State)
3158
1035
  # * :zip_code (String)
3159
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
3160
- # * :phone_consent (Boolean)
3161
- # * :email (String)
3162
- # * :email_consent (Boolean)
1036
+ # * :secondary_identification (String)
3163
1037
  # * :subscriber_primary (Hash)
3164
1038
  # * :insurance_card (Hash)
3165
1039
  # * :member_id (String)
@@ -3241,6 +1115,50 @@ module CandidApiClient
3241
1115
  # * :first_name (String)
3242
1116
  # * :last_name (String)
3243
1117
  # * :gender (CandidApiClient::Individual::Types::Gender)
1118
+ # * :prior_authorization_number (String)
1119
+ # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
1120
+ # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
1121
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
1122
+ # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
1123
+ # * :guarantor (Hash)
1124
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
1125
+ # * :phone_consent (Boolean)
1126
+ # * :email (String)
1127
+ # * :email_consent (Boolean)
1128
+ # * :auto_charge_consent (Boolean)
1129
+ # * :first_name (String)
1130
+ # * :last_name (String)
1131
+ # * :external_id (String)
1132
+ # * :date_of_birth (Date)
1133
+ # * :address (Hash)
1134
+ # * :zip_plus_four_code (String)
1135
+ # * :address_1 (String)
1136
+ # * :address_2 (String)
1137
+ # * :city (String)
1138
+ # * :state (CandidApiClient::Commons::Types::State)
1139
+ # * :zip_code (String)
1140
+ # * :external_claim_submission (Hash)
1141
+ # * :claim_created_at (DateTime)
1142
+ # * :patient_control_number (String)
1143
+ # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
1144
+ # * :tag_ids (Array<String>)
1145
+ # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
1146
+ # * :referral_number (String)
1147
+ # * :epsdt_referral (Hash)
1148
+ # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1149
+ # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1150
+ # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1151
+ # * :claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>)
1152
+ # * :secondary_payer_carrier_code (String)
1153
+ # * :external_id (String)
1154
+ # * :date_of_service (Date)
1155
+ # * :end_date_of_service (Date)
1156
+ # * :patient_authorized_release (Boolean)
1157
+ # * :benefits_assigned_to_provider (Boolean)
1158
+ # * :provider_accepts_assignment (Boolean)
1159
+ # * :appointment_type (String)
1160
+ # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
1161
+ # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
3244
1162
  # * :pay_to_address (Hash)
3245
1163
  # * :zip_plus_four_code (String)
3246
1164
  # * :address_1 (String)
@@ -3248,7 +1166,68 @@ module CandidApiClient
3248
1166
  # * :city (String)
3249
1167
  # * :state (CandidApiClient::Commons::Types::State)
3250
1168
  # * :zip_code (String)
3251
- # * :initial_referring_provider (Hash)
1169
+ # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
1170
+ # * :vitals (Hash)
1171
+ # * :height_in (Integer)
1172
+ # * :weight_lbs (Integer)
1173
+ # * :blood_pressure_systolic_mmhg (Integer)
1174
+ # * :blood_pressure_diastolic_mmhg (Integer)
1175
+ # * :body_temperature_f (Float)
1176
+ # * :hemoglobin_gdl (Float)
1177
+ # * :hematocrit_pct (Float)
1178
+ # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
1179
+ # * :additional_information (String)
1180
+ # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
1181
+ # * :admission_date (Date)
1182
+ # * :discharge_date (Date)
1183
+ # * :onset_of_current_illness_or_symptom_date (Date)
1184
+ # * :last_menstrual_period_date (Date)
1185
+ # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
1186
+ # @param request_options [CandidApiClient::RequestOptions]
1187
+ # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1188
+ # @example
1189
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1190
+ # api.encounters.v_4.create(request: { billing_provider: { address: { zip_plus_four_code: "zip_plus_four_code", address_1: "address1", city: "city", state: AA, zip_code: "zip_code" }, tax_id: "tax_id", npi: "npi" }, diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }], place_of_service_code: PHARMACY, rendering_provider: { npi: "npi" }, patient: { external_id: "external_id", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code" }, first_name: "first_name", last_name: "last_name", gender: MALE }, responsible_party: INSURANCE_PAY, external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE })
1191
+ def create(request:, request_options: nil)
1192
+ Async do
1193
+ response = @request_client.conn.post do |req|
1194
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1195
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1196
+ req.headers = {
1197
+ **(req.headers || {}),
1198
+ **@request_client.get_headers,
1199
+ **(request_options&.additional_headers || {})
1200
+ }.compact
1201
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
1202
+ req.url "#{@request_client.get_url(environment: CandidApi,
1203
+ request_options: request_options)}/api/encounters/v4"
1204
+ end
1205
+ CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
1206
+ end
1207
+ end
1208
+
1209
+ # Create an encounter from a pre-encounter patient and appointment. This endpoint
1210
+ # is intended to be used by consumers who are managing
1211
+ # patients and appointments in the pre-encounter service and is currently under
1212
+ # development. Consumers who are not taking advantage
1213
+ # of the pre-encounter service should use the standard create endpoint.
1214
+ # The endpoint will create an encounter from the provided fields, pulling
1215
+ # information from the provided patient and appointment objects
1216
+ # where applicable. In particular, the following fields are populated from the
1217
+ # patient and appointment objects:
1218
+ # - Patient
1219
+ # - Referring Provider
1220
+ # - Subscriber Primary
1221
+ # - Subscriber Secondary
1222
+ # - Referral Number
1223
+ # - Responsible Party
1224
+ # - Guarantor
1225
+ # Utilizing this endpoint opts you into automatic updating of the encounter when
1226
+ # the patient or appointment is updated, assuming the
1227
+ # encounter has not already been submitted or adjudicated.
1228
+ #
1229
+ # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreateFromPreEncounter, as a Hash
1230
+ # * :rendering_provider (Hash)
3252
1231
  # * :npi (String)
3253
1232
  # * :taxonomy_code (String)
3254
1233
  # * :address (Hash)
@@ -3258,13 +1237,15 @@ module CandidApiClient
3258
1237
  # * :city (String)
3259
1238
  # * :state (CandidApiClient::Commons::Types::State)
3260
1239
  # * :zip_code (String)
3261
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
3262
1240
  # * :first_name (String)
3263
1241
  # * :last_name (String)
3264
1242
  # * :organization_name (String)
3265
- # * :referring_provider (Hash)
3266
- # * :npi (String)
3267
- # * :taxonomy_code (String)
1243
+ # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
1244
+ # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
1245
+ # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
1246
+ # * :pre_encounter_patient_id (String)
1247
+ # * :pre_encounter_appointment_ids (Array<String>)
1248
+ # * :billing_provider (Hash)
3268
1249
  # * :address (Hash)
3269
1250
  # * :zip_plus_four_code (String)
3270
1251
  # * :address_1 (String)
@@ -3272,29 +1253,14 @@ module CandidApiClient
3272
1253
  # * :city (String)
3273
1254
  # * :state (CandidApiClient::Commons::Types::State)
3274
1255
  # * :zip_code (String)
1256
+ # * :tax_id (String)
1257
+ # * :npi (String)
1258
+ # * :taxonomy_code (String)
1259
+ # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
3275
1260
  # * :first_name (String)
3276
1261
  # * :last_name (String)
3277
1262
  # * :organization_name (String)
3278
- # * :patient (Hash)
3279
- # * :first_name (String)
3280
- # * :last_name (String)
3281
- # * :gender (CandidApiClient::Individual::Types::Gender)
3282
- # * :external_id (String)
3283
- # * :date_of_birth (Date)
3284
- # * :address (Hash)
3285
- # * :zip_plus_four_code (String)
3286
- # * :address_1 (String)
3287
- # * :address_2 (String)
3288
- # * :city (String)
3289
- # * :state (CandidApiClient::Commons::Types::State)
3290
- # * :zip_code (String)
3291
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
3292
- # * :phone_consent (Boolean)
3293
- # * :email (String)
3294
- # * :email_consent (Boolean)
3295
- # * :non_insurance_payers (Array<String>)
3296
- # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
3297
- # * :rendering_provider (Hash)
1263
+ # * :initial_referring_provider (Hash)
3298
1264
  # * :npi (String)
3299
1265
  # * :taxonomy_code (String)
3300
1266
  # * :address (Hash)
@@ -3304,20 +1270,10 @@ module CandidApiClient
3304
1270
  # * :city (String)
3305
1271
  # * :state (CandidApiClient::Commons::Types::State)
3306
1272
  # * :zip_code (String)
1273
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
3307
1274
  # * :first_name (String)
3308
1275
  # * :last_name (String)
3309
1276
  # * :organization_name (String)
3310
- # * :service_facility (Hash)
3311
- # * :organization_name (String)
3312
- # * :npi (String)
3313
- # * :address (Hash)
3314
- # * :zip_plus_four_code (String)
3315
- # * :address_1 (String)
3316
- # * :address_2 (String)
3317
- # * :city (String)
3318
- # * :state (CandidApiClient::Commons::Types::State)
3319
- # * :zip_code (String)
3320
- # * :secondary_identification (String)
3321
1277
  # * :supervising_provider (Hash)
3322
1278
  # * :npi (String)
3323
1279
  # * :taxonomy_code (String)
@@ -3331,7 +1287,9 @@ module CandidApiClient
3331
1287
  # * :first_name (String)
3332
1288
  # * :last_name (String)
3333
1289
  # * :organization_name (String)
3334
- # * :billing_provider (Hash)
1290
+ # * :service_facility (Hash)
1291
+ # * :organization_name (String)
1292
+ # * :npi (String)
3335
1293
  # * :address (Hash)
3336
1294
  # * :zip_plus_four_code (String)
3337
1295
  # * :address_1 (String)
@@ -3339,26 +1297,42 @@ module CandidApiClient
3339
1297
  # * :city (String)
3340
1298
  # * :state (CandidApiClient::Commons::Types::State)
3341
1299
  # * :zip_code (String)
3342
- # * :tax_id (String)
3343
- # * :npi (String)
3344
- # * :taxonomy_code (String)
3345
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
3346
- # * :first_name (String)
3347
- # * :last_name (String)
3348
- # * :organization_name (String)
3349
- # * :place_of_service_code_as_submitted (CandidApiClient::Commons::Types::FacilityTypeCode)
3350
- # * :benefits_assigned_to_provider (Boolean)
3351
- # * :prior_authorization_number (String)
1300
+ # * :secondary_identification (String)
1301
+ # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
1302
+ # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
1303
+ # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
1304
+ # * :external_claim_submission (Hash)
1305
+ # * :claim_created_at (DateTime)
1306
+ # * :patient_control_number (String)
1307
+ # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
1308
+ # * :tag_ids (Array<String>)
1309
+ # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
3352
1310
  # * :external_id (String)
3353
1311
  # * :date_of_service (Date)
3354
- # * :tag_ids (Array<String>)
3355
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
3356
- # * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
1312
+ # * :end_date_of_service (Date)
1313
+ # * :patient_authorized_release (Boolean)
1314
+ # * :benefits_assigned_to_provider (Boolean)
3357
1315
  # * :provider_accepts_assignment (Boolean)
3358
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
3359
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
3360
1316
  # * :appointment_type (String)
3361
- # * :end_date_of_service (Date)
1317
+ # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
1318
+ # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
1319
+ # * :pay_to_address (Hash)
1320
+ # * :zip_plus_four_code (String)
1321
+ # * :address_1 (String)
1322
+ # * :address_2 (String)
1323
+ # * :city (String)
1324
+ # * :state (CandidApiClient::Commons::Types::State)
1325
+ # * :zip_code (String)
1326
+ # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
1327
+ # * :vitals (Hash)
1328
+ # * :height_in (Integer)
1329
+ # * :weight_lbs (Integer)
1330
+ # * :blood_pressure_systolic_mmhg (Integer)
1331
+ # * :blood_pressure_diastolic_mmhg (Integer)
1332
+ # * :body_temperature_f (Float)
1333
+ # * :hemoglobin_gdl (Float)
1334
+ # * :hematocrit_pct (Float)
1335
+ # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
3362
1336
  # * :additional_information (String)
3363
1337
  # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
3364
1338
  # * :admission_date (Date)
@@ -3366,17 +1340,14 @@ module CandidApiClient
3366
1340
  # * :onset_of_current_illness_or_symptom_date (Date)
3367
1341
  # * :last_menstrual_period_date (Date)
3368
1342
  # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
3369
- # * :patient_authorized_release (Boolean)
3370
- # * :referral_number (String)
3371
- # * :secondary_payer_carrier_code (String)
3372
1343
  # @param request_options [CandidApiClient::RequestOptions]
3373
1344
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
3374
1345
  # @example
3375
1346
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
3376
- # api.encounters.v_4.update_universal(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { })
3377
- def update_universal(encounter_id:, request:, request_options: nil)
1347
+ # api.encounters.v_4.create_from_pre_encounter_patient(request: { rendering_provider: { npi: "npi" }, place_of_service_code: PHARMACY, diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }], pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], billing_provider: { address: { zip_plus_four_code: "zip_plus_four_code", address_1: "address1", city: "city", state: AA, zip_code: "zip_code" }, tax_id: "tax_id", npi: "npi" }, external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE })
1348
+ def create_from_pre_encounter_patient(request:, request_options: nil)
3378
1349
  Async do
3379
- response = @request_client.conn.patch do |req|
1350
+ response = @request_client.conn.post do |req|
3380
1351
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
3381
1352
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
3382
1353
  req.headers = {
@@ -3386,7 +1357,7 @@ module CandidApiClient
3386
1357
  }.compact
3387
1358
  req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
3388
1359
  req.url "#{@request_client.get_url(environment: CandidApi,
3389
- request_options: request_options)}/api/encounters/v4/#{encounter_id}/universal"
1360
+ request_options: request_options)}/api/encounters/v4/create-from-pre-encounter"
3390
1361
  end
3391
1362
  CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
3392
1363
  end
@@ -3427,6 +1398,7 @@ module CandidApiClient
3427
1398
  # * :phone_consent (Boolean)
3428
1399
  # * :email (String)
3429
1400
  # * :email_consent (Boolean)
1401
+ # * :auto_charge_consent (Boolean)
3430
1402
  # * :subscriber_primary (Hash)
3431
1403
  # * :insurance_card (Hash)
3432
1404
  # * :member_id (String)
@@ -3559,6 +1531,7 @@ module CandidApiClient
3559
1531
  # * :phone_consent (Boolean)
3560
1532
  # * :email (String)
3561
1533
  # * :email_consent (Boolean)
1534
+ # * :auto_charge_consent (Boolean)
3562
1535
  # * :non_insurance_payers (Array<String>)
3563
1536
  # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
3564
1537
  # * :rendering_provider (Hash)