candidhealth 0.34.1 → 0.34.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider.rb +10 -10
  3. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update.rb +123 -0
  4. data/lib/candidhealth/encounters/v_4/client.rb +282 -32
  5. data/lib/candidhealth/encounters/v_4/types/encounter.rb +11 -11
  6. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +11 -1
  7. data/lib/candidhealth/{third_party_payers/v_1/types/toggle_third_party_payer_enablement_request.rb → encounters/v_4/types/insurance_pay_missing_primary_coverage_error_type.rb} +17 -16
  8. data/lib/candidhealth/guarantor/v_1/client.rb +39 -89
  9. data/lib/candidhealth/guarantor/v_1/types/guarantor_update.rb +144 -0
  10. data/lib/candidhealth/payers/v_3/types/payer.rb +41 -2
  11. data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +68 -4
  12. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +17 -1
  13. data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +17 -1
  14. data/lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb +92 -0
  15. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +48 -4
  16. data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefit_type.rb +20 -0
  17. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +15 -1
  18. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_details.rb +104 -0
  19. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_level.rb +17 -0
  20. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit.rb +17 -0
  21. data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +16 -2
  22. data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +83 -0
  23. data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +15 -1
  24. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb +29 -2
  25. data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb +26 -2
  26. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +12 -4
  27. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +148 -0
  28. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization_unit.rb +15 -0
  29. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +26 -2
  30. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +26 -2
  31. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral.rb +106 -0
  32. data/lib/candidhealth/service_facility/client.rb +27 -51
  33. data/lib/candidhealth/service_facility/types/encounter_service_facility_update.rb +90 -0
  34. data/lib/candidhealth.rb +0 -21
  35. data/lib/requests.rb +2 -2
  36. data/lib/types_export.rb +13 -16
  37. metadata +15 -24
  38. data/lib/candidhealth/third_party_payer_payments/client.rb +0 -30
  39. data/lib/candidhealth/third_party_payer_payments/v_1/client.rb +0 -360
  40. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment.rb +0 -138
  41. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_create.rb +0 -124
  42. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_sort_field.rb +0 -14
  43. data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payments_page.rb +0 -88
  44. data/lib/candidhealth/third_party_payer_refunds/client.rb +0 -30
  45. data/lib/candidhealth/third_party_payer_refunds/v_1/client.rb +0 -385
  46. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund.rb +0 -139
  47. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_create.rb +0 -125
  48. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_sort_field.rb +0 -14
  49. data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refunds_page.rb +0 -88
  50. data/lib/candidhealth/third_party_payers/client.rb +0 -30
  51. data/lib/candidhealth/third_party_payers/v_1/client.rb +0 -375
  52. data/lib/candidhealth/third_party_payers/v_1/types/create_third_party_payer_request.rb +0 -79
  53. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer.rb +0 -100
  54. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_category_update.rb +0 -97
  55. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_description_update.rb +0 -97
  56. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_page.rb +0 -88
  57. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_sort_field.rb +0 -16
  58. data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_update_request.rb +0 -92
@@ -36,6 +36,12 @@ require_relative "../../claim_submission/v_1/types/external_claim_submission_cre
36
36
  require_relative "../../custom_schemas/v_1/types/schema_instance"
37
37
  require_relative "../../individual/types/patient_update"
38
38
  require_relative "types/vitals_update"
39
+ require_relative "../../encounter_providers/v_2/types/rendering_provider_update"
40
+ require_relative "../../service_facility/types/encounter_service_facility_update"
41
+ require_relative "../../guarantor/v_1/types/guarantor_update"
42
+ require_relative "../../encounter_providers/v_2/types/supervising_provider_update"
43
+ require_relative "../../encounter_providers/v_2/types/referring_provider_update"
44
+ require_relative "../../encounter_providers/v_2/types/initial_referring_provider_update"
39
45
  require "async"
40
46
 
41
47
  module CandidApiClient
@@ -176,6 +182,8 @@ module CandidApiClient
176
182
  # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
177
183
  # to be made to you, not them.
178
184
  # Box 27 on the CMS-1500 claim form.
185
+ # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
186
+ # Headaches").
179
187
  # @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
180
188
  # * :name (String)
181
189
  # * :rx_cui (String)
@@ -296,6 +304,8 @@ module CandidApiClient
296
304
  # For telehealth services, the rendering provider performs the visit, asynchronous
297
305
  # communication, or other service. The rendering provider address should generally
298
306
  # be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProvider, as a Hash
307
+ # * :npi (String)
308
+ # * :taxonomy_code (String)
299
309
  # * :address (Hash)
300
310
  # * :zip_plus_four_code (String)
301
311
  # * :address_1 (String)
@@ -303,8 +313,6 @@ module CandidApiClient
303
313
  # * :city (String)
304
314
  # * :state (CandidApiClient::Commons::Types::State)
305
315
  # * :zip_code (String)
306
- # * :npi (String)
307
- # * :taxonomy_code (String)
308
316
  # * :first_name (String)
309
317
  # * :last_name (String)
310
318
  # * :organization_name (String)
@@ -433,8 +441,6 @@ module CandidApiClient
433
441
  # * :last_name (String)
434
442
  # * :gender (CandidApiClient::Individual::Types::Gender)
435
443
  # @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
436
- # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
437
- # Headaches").
438
444
  # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
439
445
  # @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
440
446
  # diagnoses
@@ -527,7 +533,7 @@ module CandidApiClient
527
533
  # api.encounters.v_4.create(
528
534
  # patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], email_consent: true, external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", gender: MALE },
529
535
  # billing_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, tax_id: "string", npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
530
- # rendering_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
536
+ # rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
531
537
  # referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
532
538
  # initial_referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" },
533
539
  # supervising_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
@@ -535,7 +541,6 @@ module CandidApiClient
535
541
  # subscriber_primary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string", rx_bin: "string", rx_pcn: "string", image_url_front: "string", image_url_back: "string", emr_payer_crosswalk: HEALTHIE, group_number: "string", plan_name: "string", plan_type: SELF_PAY, insurance_type: C_01 }, patient_relationship_to_subscriber_code: SPOUSE, date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", gender: MALE },
536
542
  # subscriber_secondary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string", rx_bin: "string", rx_pcn: "string", image_url_front: "string", image_url_back: "string", emr_payer_crosswalk: HEALTHIE, group_number: "string", plan_name: "string", plan_type: SELF_PAY, insurance_type: C_01 }, patient_relationship_to_subscriber_code: SPOUSE, date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", gender: MALE },
537
543
  # prior_authorization_number: "string",
538
- # appointment_type: "string",
539
544
  # responsible_party: INSURANCE_PAY,
540
545
  # diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
541
546
  # clinical_notes: [{ category: CLINICAL, notes: [{ text: "string", author_name: "string", author_npi: "string", timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }] }],
@@ -549,7 +554,7 @@ module CandidApiClient
549
554
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
550
555
  # )
551
556
  def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
552
- provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, appointment_type: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
557
+ provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
553
558
  response = @request_client.conn.post do |req|
554
559
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
555
560
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -566,6 +571,7 @@ module CandidApiClient
566
571
  patient_authorized_release: patient_authorized_release,
567
572
  benefits_assigned_to_provider: benefits_assigned_to_provider,
568
573
  provider_accepts_assignment: provider_accepts_assignment,
574
+ appointment_type: appointment_type,
569
575
  existing_medications: existing_medications,
570
576
  vitals: vitals,
571
577
  interventions: interventions,
@@ -591,7 +597,6 @@ module CandidApiClient
591
597
  subscriber_primary: subscriber_primary,
592
598
  subscriber_secondary: subscriber_secondary,
593
599
  prior_authorization_number: prior_authorization_number,
594
- appointment_type: appointment_type,
595
600
  responsible_party: responsible_party,
596
601
  diagnoses: diagnoses,
597
602
  clinical_notes: clinical_notes,
@@ -624,7 +629,6 @@ module CandidApiClient
624
629
  # - Subscriber Primary
625
630
  # - Subscriber Secondary
626
631
  # - Prior Authorization Number
627
- # - Appointment Type
628
632
  # - Responsible Party
629
633
  # - Guarantor
630
634
  # Utilizing this endpoint opts you into automatic updating of the encounter when
@@ -659,6 +663,8 @@ module CandidApiClient
659
663
  # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
660
664
  # to be made to you, not them.
661
665
  # Box 27 on the CMS-1500 claim form.
666
+ # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
667
+ # Headaches").
662
668
  # @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
663
669
  # * :name (String)
664
670
  # * :rx_cui (String)
@@ -762,6 +768,8 @@ module CandidApiClient
762
768
  # For telehealth services, the rendering provider performs the visit, asynchronous
763
769
  # communication, or other service. The rendering provider address should generally
764
770
  # be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProvider, as a Hash
771
+ # * :npi (String)
772
+ # * :taxonomy_code (String)
765
773
  # * :address (Hash)
766
774
  # * :zip_plus_four_code (String)
767
775
  # * :address_1 (String)
@@ -769,8 +777,6 @@ module CandidApiClient
769
777
  # * :city (String)
770
778
  # * :state (CandidApiClient::Commons::Types::State)
771
779
  # * :zip_code (String)
772
- # * :npi (String)
773
- # * :taxonomy_code (String)
774
780
  # * :first_name (String)
775
781
  # * :last_name (String)
776
782
  # * :organization_name (String)
@@ -900,7 +906,7 @@ module CandidApiClient
900
906
  # pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
901
907
  # pre_encounter_appointment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
902
908
  # billing_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, tax_id: "string", npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
903
- # rendering_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
909
+ # rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
904
910
  # initial_referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" },
905
911
  # supervising_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
906
912
  # service_facility: { organization_name: "string", npi: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } },
@@ -915,7 +921,7 @@ module CandidApiClient
915
921
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
916
922
  # )
917
923
  def create_from_pre_encounter_patient(external_id:, patient_authorized_release:,
918
- benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_id:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
924
+ benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_id:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
919
925
  response = @request_client.conn.post do |req|
920
926
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
921
927
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -932,6 +938,7 @@ module CandidApiClient
932
938
  patient_authorized_release: patient_authorized_release,
933
939
  benefits_assigned_to_provider: benefits_assigned_to_provider,
934
940
  provider_accepts_assignment: provider_accepts_assignment,
941
+ appointment_type: appointment_type,
935
942
  existing_medications: existing_medications,
936
943
  vitals: vitals,
937
944
  interventions: interventions,
@@ -1153,6 +1160,113 @@ module CandidApiClient
1153
1160
  # * :body_temperature_f (Float)
1154
1161
  # * :hemoglobin_gdl (Float)
1155
1162
  # * :hematocrit_pct (Float)
1163
+ # @param existing_medications [Array<Hash>] Existing medications that should be on the encounter.
1164
+ # Note all current existing medications on encounter will be overridden with this
1165
+ # list.Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
1166
+ # * :name (String)
1167
+ # * :rx_cui (String)
1168
+ # * :dosage (String)
1169
+ # * :dosage_form (String)
1170
+ # * :frequency (String)
1171
+ # * :as_needed (Boolean)
1172
+ # @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
1173
+ # etc. -- performing the service.
1174
+ # For telehealth services, the rendering provider performs the visit, asynchronous
1175
+ # communication, or other service. The rendering provider address should generally
1176
+ # be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProviderUpdate, as a Hash
1177
+ # * :npi (String)
1178
+ # * :taxonomy_code (String)
1179
+ # * :address (Hash)
1180
+ # * :zip_plus_four_code (String)
1181
+ # * :address_1 (String)
1182
+ # * :address_2 (String)
1183
+ # * :city (String)
1184
+ # * :state (CandidApiClient::Commons::Types::State)
1185
+ # * :zip_code (String)
1186
+ # * :first_name (String)
1187
+ # * :last_name (String)
1188
+ # * :organization_name (String)
1189
+ # @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
1190
+ # rendered, such as a provider office or hospital. For telehealth, service
1191
+ # facility can represent the provider's location when the service was delivered
1192
+ # (e.g., home), or the location where an in-person visit would have taken place,
1193
+ # whichever is easier to identify. If the provider is in-network, service facility
1194
+ # may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
1195
+ # for an in-network claim to be successfully adjudicated, the service facility
1196
+ # address listed on claims must match what was provided to the payer during the
1197
+ # credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate, as a Hash
1198
+ # * :organization_name (String)
1199
+ # * :npi (String)
1200
+ # * :address (Hash)
1201
+ # * :zip_plus_four_code (String)
1202
+ # * :address_1 (String)
1203
+ # * :address_2 (String)
1204
+ # * :city (String)
1205
+ # * :state (CandidApiClient::Commons::Types::State)
1206
+ # * :zip_code (String)
1207
+ # @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorUpdate, as a Hash
1208
+ # * :first_name (String)
1209
+ # * :last_name (String)
1210
+ # * :external_id (String)
1211
+ # * :date_of_birth (Date)
1212
+ # * :address (Hash)
1213
+ # * :zip_plus_four_code (String)
1214
+ # * :address_1 (String)
1215
+ # * :address_2 (String)
1216
+ # * :city (String)
1217
+ # * :state (CandidApiClient::Commons::Types::State)
1218
+ # * :zip_code (String)
1219
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
1220
+ # * :phone_consent (Boolean)
1221
+ # * :email (String)
1222
+ # * :email_consent (Boolean)
1223
+ # @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
1224
+ # required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash
1225
+ # * :npi (String)
1226
+ # * :taxonomy_code (String)
1227
+ # * :address (Hash)
1228
+ # * :zip_plus_four_code (String)
1229
+ # * :address_1 (String)
1230
+ # * :address_2 (String)
1231
+ # * :city (String)
1232
+ # * :state (CandidApiClient::Commons::Types::State)
1233
+ # * :zip_code (String)
1234
+ # * :first_name (String)
1235
+ # * :last_name (String)
1236
+ # * :organization_name (String)
1237
+ # @param referring_provider [Hash] The final provider who referred the services that were rendered.
1238
+ # All physicians who order services or refer Medicare beneficiaries must
1239
+ # report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate, as a Hash
1240
+ # * :npi (String)
1241
+ # * :taxonomy_code (String)
1242
+ # * :address (Hash)
1243
+ # * :zip_plus_four_code (String)
1244
+ # * :address_1 (String)
1245
+ # * :address_2 (String)
1246
+ # * :city (String)
1247
+ # * :state (CandidApiClient::Commons::Types::State)
1248
+ # * :zip_code (String)
1249
+ # * :first_name (String)
1250
+ # * :last_name (String)
1251
+ # * :organization_name (String)
1252
+ # @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
1253
+ # this loop to
1254
+ # indicate the initial referral from the primary care provider or whatever
1255
+ # provider wrote the initial referral for this patient's episode of care being
1256
+ # billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate, as a Hash
1257
+ # * :npi (String)
1258
+ # * :taxonomy_code (String)
1259
+ # * :address (Hash)
1260
+ # * :zip_plus_four_code (String)
1261
+ # * :address_1 (String)
1262
+ # * :address_2 (String)
1263
+ # * :city (String)
1264
+ # * :state (CandidApiClient::Commons::Types::State)
1265
+ # * :zip_code (String)
1266
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
1267
+ # * :first_name (String)
1268
+ # * :last_name (String)
1269
+ # * :organization_name (String)
1156
1270
  # @param request_options [CandidApiClient::RequestOptions]
1157
1271
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1158
1272
  # @example
@@ -1187,10 +1301,17 @@ module CandidApiClient
1187
1301
  # patient: { first_name: "string", last_name: "string", gender: MALE, external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true, non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] },
1188
1302
  # patient_authorized_release: true,
1189
1303
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
1190
- # vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 }
1304
+ # vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 },
1305
+ # existing_medications: [{ name: "Lisinopril", rx_cui: "860975", dosage: "10mg", dosage_form: "Tablet", frequency: "Once Daily", as_needed: true }],
1306
+ # rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
1307
+ # service_facility: { organization_name: "Test Organization", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } },
1308
+ # guarantor: { first_name: "string", last_name: "string", external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true },
1309
+ # supervising_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
1310
+ # referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
1311
+ # initial_referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" }
1191
1312
  # )
1192
1313
  def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
1193
- diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, request_options: nil)
1314
+ diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, request_options: nil)
1194
1315
  response = @request_client.conn.patch do |req|
1195
1316
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1196
1317
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -1229,7 +1350,14 @@ module CandidApiClient
1229
1350
  patient: patient,
1230
1351
  patient_authorized_release: patient_authorized_release,
1231
1352
  schema_instances: schema_instances,
1232
- vitals: vitals
1353
+ vitals: vitals,
1354
+ existing_medications: existing_medications,
1355
+ rendering_provider: rendering_provider,
1356
+ service_facility: service_facility,
1357
+ guarantor: guarantor,
1358
+ supervising_provider: supervising_provider,
1359
+ referring_provider: referring_provider,
1360
+ initial_referring_provider: initial_referring_provider
1233
1361
  }.compact
1234
1362
  req.url "#{@request_client.get_url(environment: CandidApi,
1235
1363
  request_options: request_options)}/api/encounters/v4/#{encounter_id}"
@@ -1377,6 +1505,8 @@ module CandidApiClient
1377
1505
  # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
1378
1506
  # to be made to you, not them.
1379
1507
  # Box 27 on the CMS-1500 claim form.
1508
+ # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
1509
+ # Headaches").
1380
1510
  # @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
1381
1511
  # * :name (String)
1382
1512
  # * :rx_cui (String)
@@ -1497,6 +1627,8 @@ module CandidApiClient
1497
1627
  # For telehealth services, the rendering provider performs the visit, asynchronous
1498
1628
  # communication, or other service. The rendering provider address should generally
1499
1629
  # be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProvider, as a Hash
1630
+ # * :npi (String)
1631
+ # * :taxonomy_code (String)
1500
1632
  # * :address (Hash)
1501
1633
  # * :zip_plus_four_code (String)
1502
1634
  # * :address_1 (String)
@@ -1504,8 +1636,6 @@ module CandidApiClient
1504
1636
  # * :city (String)
1505
1637
  # * :state (CandidApiClient::Commons::Types::State)
1506
1638
  # * :zip_code (String)
1507
- # * :npi (String)
1508
- # * :taxonomy_code (String)
1509
1639
  # * :first_name (String)
1510
1640
  # * :last_name (String)
1511
1641
  # * :organization_name (String)
@@ -1634,8 +1764,6 @@ module CandidApiClient
1634
1764
  # * :last_name (String)
1635
1765
  # * :gender (CandidApiClient::Individual::Types::Gender)
1636
1766
  # @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
1637
- # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
1638
- # Headaches").
1639
1767
  # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
1640
1768
  # @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
1641
1769
  # diagnoses
@@ -1728,7 +1856,7 @@ module CandidApiClient
1728
1856
  # api.encounters.v_4.create(
1729
1857
  # patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], email_consent: true, external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", gender: MALE },
1730
1858
  # billing_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, tax_id: "string", npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
1731
- # rendering_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
1859
+ # rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
1732
1860
  # referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
1733
1861
  # initial_referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" },
1734
1862
  # supervising_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
@@ -1736,7 +1864,6 @@ module CandidApiClient
1736
1864
  # subscriber_primary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string", rx_bin: "string", rx_pcn: "string", image_url_front: "string", image_url_back: "string", emr_payer_crosswalk: HEALTHIE, group_number: "string", plan_name: "string", plan_type: SELF_PAY, insurance_type: C_01 }, patient_relationship_to_subscriber_code: SPOUSE, date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", gender: MALE },
1737
1865
  # subscriber_secondary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string", rx_bin: "string", rx_pcn: "string", image_url_front: "string", image_url_back: "string", emr_payer_crosswalk: HEALTHIE, group_number: "string", plan_name: "string", plan_type: SELF_PAY, insurance_type: C_01 }, patient_relationship_to_subscriber_code: SPOUSE, date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", gender: MALE },
1738
1866
  # prior_authorization_number: "string",
1739
- # appointment_type: "string",
1740
1867
  # responsible_party: INSURANCE_PAY,
1741
1868
  # diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
1742
1869
  # clinical_notes: [{ category: CLINICAL, notes: [{ text: "string", author_name: "string", author_npi: "string", timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }] }],
@@ -1750,7 +1877,7 @@ module CandidApiClient
1750
1877
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
1751
1878
  # )
1752
1879
  def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
1753
- provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, appointment_type: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
1880
+ provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
1754
1881
  Async do
1755
1882
  response = @request_client.conn.post do |req|
1756
1883
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -1768,6 +1895,7 @@ module CandidApiClient
1768
1895
  patient_authorized_release: patient_authorized_release,
1769
1896
  benefits_assigned_to_provider: benefits_assigned_to_provider,
1770
1897
  provider_accepts_assignment: provider_accepts_assignment,
1898
+ appointment_type: appointment_type,
1771
1899
  existing_medications: existing_medications,
1772
1900
  vitals: vitals,
1773
1901
  interventions: interventions,
@@ -1793,7 +1921,6 @@ module CandidApiClient
1793
1921
  subscriber_primary: subscriber_primary,
1794
1922
  subscriber_secondary: subscriber_secondary,
1795
1923
  prior_authorization_number: prior_authorization_number,
1796
- appointment_type: appointment_type,
1797
1924
  responsible_party: responsible_party,
1798
1925
  diagnoses: diagnoses,
1799
1926
  clinical_notes: clinical_notes,
@@ -1827,7 +1954,6 @@ module CandidApiClient
1827
1954
  # - Subscriber Primary
1828
1955
  # - Subscriber Secondary
1829
1956
  # - Prior Authorization Number
1830
- # - Appointment Type
1831
1957
  # - Responsible Party
1832
1958
  # - Guarantor
1833
1959
  # Utilizing this endpoint opts you into automatic updating of the encounter when
@@ -1862,6 +1988,8 @@ module CandidApiClient
1862
1988
  # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
1863
1989
  # to be made to you, not them.
1864
1990
  # Box 27 on the CMS-1500 claim form.
1991
+ # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
1992
+ # Headaches").
1865
1993
  # @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
1866
1994
  # * :name (String)
1867
1995
  # * :rx_cui (String)
@@ -1965,6 +2093,8 @@ module CandidApiClient
1965
2093
  # For telehealth services, the rendering provider performs the visit, asynchronous
1966
2094
  # communication, or other service. The rendering provider address should generally
1967
2095
  # be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProvider, as a Hash
2096
+ # * :npi (String)
2097
+ # * :taxonomy_code (String)
1968
2098
  # * :address (Hash)
1969
2099
  # * :zip_plus_four_code (String)
1970
2100
  # * :address_1 (String)
@@ -1972,8 +2102,6 @@ module CandidApiClient
1972
2102
  # * :city (String)
1973
2103
  # * :state (CandidApiClient::Commons::Types::State)
1974
2104
  # * :zip_code (String)
1975
- # * :npi (String)
1976
- # * :taxonomy_code (String)
1977
2105
  # * :first_name (String)
1978
2106
  # * :last_name (String)
1979
2107
  # * :organization_name (String)
@@ -2103,7 +2231,7 @@ module CandidApiClient
2103
2231
  # pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
2104
2232
  # pre_encounter_appointment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
2105
2233
  # billing_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, tax_id: "string", npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
2106
- # rendering_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
2234
+ # rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
2107
2235
  # initial_referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" },
2108
2236
  # supervising_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
2109
2237
  # service_facility: { organization_name: "string", npi: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } },
@@ -2118,7 +2246,7 @@ module CandidApiClient
2118
2246
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
2119
2247
  # )
2120
2248
  def create_from_pre_encounter_patient(external_id:, patient_authorized_release:,
2121
- benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_id:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
2249
+ benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_id:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
2122
2250
  Async do
2123
2251
  response = @request_client.conn.post do |req|
2124
2252
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -2136,6 +2264,7 @@ module CandidApiClient
2136
2264
  patient_authorized_release: patient_authorized_release,
2137
2265
  benefits_assigned_to_provider: benefits_assigned_to_provider,
2138
2266
  provider_accepts_assignment: provider_accepts_assignment,
2267
+ appointment_type: appointment_type,
2139
2268
  existing_medications: existing_medications,
2140
2269
  vitals: vitals,
2141
2270
  interventions: interventions,
@@ -2358,6 +2487,113 @@ module CandidApiClient
2358
2487
  # * :body_temperature_f (Float)
2359
2488
  # * :hemoglobin_gdl (Float)
2360
2489
  # * :hematocrit_pct (Float)
2490
+ # @param existing_medications [Array<Hash>] Existing medications that should be on the encounter.
2491
+ # Note all current existing medications on encounter will be overridden with this
2492
+ # list.Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
2493
+ # * :name (String)
2494
+ # * :rx_cui (String)
2495
+ # * :dosage (String)
2496
+ # * :dosage_form (String)
2497
+ # * :frequency (String)
2498
+ # * :as_needed (Boolean)
2499
+ # @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
2500
+ # etc. -- performing the service.
2501
+ # For telehealth services, the rendering provider performs the visit, asynchronous
2502
+ # communication, or other service. The rendering provider address should generally
2503
+ # be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProviderUpdate, as a Hash
2504
+ # * :npi (String)
2505
+ # * :taxonomy_code (String)
2506
+ # * :address (Hash)
2507
+ # * :zip_plus_four_code (String)
2508
+ # * :address_1 (String)
2509
+ # * :address_2 (String)
2510
+ # * :city (String)
2511
+ # * :state (CandidApiClient::Commons::Types::State)
2512
+ # * :zip_code (String)
2513
+ # * :first_name (String)
2514
+ # * :last_name (String)
2515
+ # * :organization_name (String)
2516
+ # @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
2517
+ # rendered, such as a provider office or hospital. For telehealth, service
2518
+ # facility can represent the provider's location when the service was delivered
2519
+ # (e.g., home), or the location where an in-person visit would have taken place,
2520
+ # whichever is easier to identify. If the provider is in-network, service facility
2521
+ # may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
2522
+ # for an in-network claim to be successfully adjudicated, the service facility
2523
+ # address listed on claims must match what was provided to the payer during the
2524
+ # credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate, as a Hash
2525
+ # * :organization_name (String)
2526
+ # * :npi (String)
2527
+ # * :address (Hash)
2528
+ # * :zip_plus_four_code (String)
2529
+ # * :address_1 (String)
2530
+ # * :address_2 (String)
2531
+ # * :city (String)
2532
+ # * :state (CandidApiClient::Commons::Types::State)
2533
+ # * :zip_code (String)
2534
+ # @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorUpdate, as a Hash
2535
+ # * :first_name (String)
2536
+ # * :last_name (String)
2537
+ # * :external_id (String)
2538
+ # * :date_of_birth (Date)
2539
+ # * :address (Hash)
2540
+ # * :zip_plus_four_code (String)
2541
+ # * :address_1 (String)
2542
+ # * :address_2 (String)
2543
+ # * :city (String)
2544
+ # * :state (CandidApiClient::Commons::Types::State)
2545
+ # * :zip_code (String)
2546
+ # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
2547
+ # * :phone_consent (Boolean)
2548
+ # * :email (String)
2549
+ # * :email_consent (Boolean)
2550
+ # @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
2551
+ # required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash
2552
+ # * :npi (String)
2553
+ # * :taxonomy_code (String)
2554
+ # * :address (Hash)
2555
+ # * :zip_plus_four_code (String)
2556
+ # * :address_1 (String)
2557
+ # * :address_2 (String)
2558
+ # * :city (String)
2559
+ # * :state (CandidApiClient::Commons::Types::State)
2560
+ # * :zip_code (String)
2561
+ # * :first_name (String)
2562
+ # * :last_name (String)
2563
+ # * :organization_name (String)
2564
+ # @param referring_provider [Hash] The final provider who referred the services that were rendered.
2565
+ # All physicians who order services or refer Medicare beneficiaries must
2566
+ # report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate, as a Hash
2567
+ # * :npi (String)
2568
+ # * :taxonomy_code (String)
2569
+ # * :address (Hash)
2570
+ # * :zip_plus_four_code (String)
2571
+ # * :address_1 (String)
2572
+ # * :address_2 (String)
2573
+ # * :city (String)
2574
+ # * :state (CandidApiClient::Commons::Types::State)
2575
+ # * :zip_code (String)
2576
+ # * :first_name (String)
2577
+ # * :last_name (String)
2578
+ # * :organization_name (String)
2579
+ # @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
2580
+ # this loop to
2581
+ # indicate the initial referral from the primary care provider or whatever
2582
+ # provider wrote the initial referral for this patient's episode of care being
2583
+ # billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate, as a Hash
2584
+ # * :npi (String)
2585
+ # * :taxonomy_code (String)
2586
+ # * :address (Hash)
2587
+ # * :zip_plus_four_code (String)
2588
+ # * :address_1 (String)
2589
+ # * :address_2 (String)
2590
+ # * :city (String)
2591
+ # * :state (CandidApiClient::Commons::Types::State)
2592
+ # * :zip_code (String)
2593
+ # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
2594
+ # * :first_name (String)
2595
+ # * :last_name (String)
2596
+ # * :organization_name (String)
2361
2597
  # @param request_options [CandidApiClient::RequestOptions]
2362
2598
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
2363
2599
  # @example
@@ -2392,10 +2628,17 @@ module CandidApiClient
2392
2628
  # patient: { first_name: "string", last_name: "string", gender: MALE, external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true, non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] },
2393
2629
  # patient_authorized_release: true,
2394
2630
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
2395
- # vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 }
2631
+ # vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 },
2632
+ # existing_medications: [{ name: "Lisinopril", rx_cui: "860975", dosage: "10mg", dosage_form: "Tablet", frequency: "Once Daily", as_needed: true }],
2633
+ # rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
2634
+ # service_facility: { organization_name: "Test Organization", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } },
2635
+ # guarantor: { first_name: "string", last_name: "string", external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true },
2636
+ # supervising_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
2637
+ # referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
2638
+ # initial_referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" }
2396
2639
  # )
2397
2640
  def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
2398
- diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, request_options: nil)
2641
+ diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, request_options: nil)
2399
2642
  Async do
2400
2643
  response = @request_client.conn.patch do |req|
2401
2644
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -2435,7 +2678,14 @@ module CandidApiClient
2435
2678
  patient: patient,
2436
2679
  patient_authorized_release: patient_authorized_release,
2437
2680
  schema_instances: schema_instances,
2438
- vitals: vitals
2681
+ vitals: vitals,
2682
+ existing_medications: existing_medications,
2683
+ rendering_provider: rendering_provider,
2684
+ service_facility: service_facility,
2685
+ guarantor: guarantor,
2686
+ supervising_provider: supervising_provider,
2687
+ referring_provider: referring_provider,
2688
+ initial_referring_provider: initial_referring_provider
2439
2689
  }.compact
2440
2690
  req.url "#{@request_client.get_url(environment: CandidApi,
2441
2691
  request_options: request_options)}/api/encounters/v4/#{encounter_id}"