candidhealth 0.33.1 → 0.34.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/candidhealth/encounters/v_4/client.rb +1216 -449
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +76 -64
- data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +48 -29
- data/lib/candidhealth/individual/types/patient_update.rb +165 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +1 -0
- metadata +3 -2
@@ -34,6 +34,7 @@ require_relative "../../service_lines/v_2/types/service_line_create"
|
|
34
34
|
require_relative "../../guarantor/v_1/types/guarantor_create"
|
35
35
|
require_relative "../../claim_submission/v_1/types/external_claim_submission_create"
|
36
36
|
require_relative "../../custom_schemas/v_1/types/schema_instance"
|
37
|
+
require_relative "../../individual/types/patient_update"
|
37
38
|
require_relative "types/vitals_update"
|
38
39
|
require "async"
|
39
40
|
|
@@ -150,7 +151,22 @@ module CandidApiClient
|
|
150
151
|
# @param external_id [String] A client-specified unique ID to associate with this encounter;
|
151
152
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
152
153
|
# This field should not contain PHI.
|
153
|
-
# @param
|
154
|
+
# @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
155
|
+
# This date must be the local date in the timezone where the service occurred.
|
156
|
+
# Box 24a on the CMS-1500 claim form.
|
157
|
+
# If service occurred over a range of dates, this should be the start date.
|
158
|
+
# date_of_service must be defined on either the encounter or the service lines but
|
159
|
+
# not both.
|
160
|
+
# If there are greater than zero service lines, it is recommended to specify
|
161
|
+
# date_of_service on the service_line instead of on the encounter to prepare for
|
162
|
+
# future API versions.
|
163
|
+
# @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
164
|
+
# This date must be the local date in the timezone where the service occurred.
|
165
|
+
# If omitted, the Encounter is assumed to be for a single day.
|
166
|
+
# Must not be temporally before the date_of_service field.
|
167
|
+
# If there are greater than zero service lines, it is recommended to specify
|
168
|
+
# end_date_of_service on the service_line instead of on the encounter to prepare
|
169
|
+
# for future API versions.
|
154
170
|
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
155
171
|
# for billing purpose.
|
156
172
|
# Box 12 on the CMS-1500 claim form.
|
@@ -160,8 +176,6 @@ module CandidApiClient
|
|
160
176
|
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
|
161
177
|
# to be made to you, not them.
|
162
178
|
# Box 27 on the CMS-1500 claim form.
|
163
|
-
# @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
164
|
-
# Headaches").
|
165
179
|
# @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
|
166
180
|
# * :name (String)
|
167
181
|
# * :rx_cui (String)
|
@@ -207,7 +221,6 @@ module CandidApiClient
|
|
207
221
|
# Examples for when this should be set to NOT_BILLABLE include
|
208
222
|
# if the Encounter has not occurred yet or if there is no intention of ever
|
209
223
|
# billing the responsible_party.
|
210
|
-
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
|
211
224
|
# @param additional_information [String] Defines additional information on the claim needed by the payer.
|
212
225
|
# Box 19 on the CMS-1500 claim form.
|
213
226
|
# @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
|
@@ -237,22 +250,6 @@ module CandidApiClient
|
|
237
250
|
# Code indicating the reason why a request was delayed
|
238
251
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
239
252
|
# @param _field_set [Object]
|
240
|
-
# @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
241
|
-
# This date must be the local date in the timezone where the service occurred.
|
242
|
-
# Box 24a on the CMS-1500 claim form.
|
243
|
-
# If service occurred over a range of dates, this should be the start date.
|
244
|
-
# date_of_service must be defined on either the encounter or the service lines but
|
245
|
-
# not both.
|
246
|
-
# If there are greater than zero service lines, it is recommended to specify
|
247
|
-
# date_of_service on the service_line instead of on the encounter to prepare for
|
248
|
-
# future API versions.
|
249
|
-
# @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
250
|
-
# This date must be the local date in the timezone where the service occurred.
|
251
|
-
# If omitted, the Encounter is assumed to be for a single day.
|
252
|
-
# Must not be temporally before the date_of_service field.
|
253
|
-
# If there are greater than zero service lines, it is recommended to specify
|
254
|
-
# end_date_of_service on the service_line instead of on the encounter to prepare
|
255
|
-
# for future API versions.
|
256
253
|
# @param patient [Hash] Contains the identification information of the individual receiving medical
|
257
254
|
# services.Request of type CandidApiClient::Individual::Types::PatientCreate, as a Hash
|
258
255
|
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
@@ -435,6 +432,10 @@ module CandidApiClient
|
|
435
432
|
# * :first_name (String)
|
436
433
|
# * :last_name (String)
|
437
434
|
# * :gender (CandidApiClient::Individual::Types::Gender)
|
435
|
+
# @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
|
+
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
|
438
439
|
# @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
439
440
|
# diagnoses
|
440
441
|
# may be submitted at this time, and coders will later prioritize the 12 that will
|
@@ -524,8 +525,6 @@ module CandidApiClient
|
|
524
525
|
# @example
|
525
526
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
526
527
|
# api.encounters.v_4.create(
|
527
|
-
# date_of_service: DateTime.parse(2023-01-15),
|
528
|
-
# end_date_of_service: DateTime.parse(2023-01-15),
|
529
528
|
# 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 },
|
530
529
|
# 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" },
|
531
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" },
|
@@ -535,6 +534,9 @@ module CandidApiClient
|
|
535
534
|
# 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" } },
|
536
535
|
# 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 },
|
537
536
|
# 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
|
+
# prior_authorization_number: "string",
|
538
|
+
# appointment_type: "string",
|
539
|
+
# responsible_party: INSURANCE_PAY,
|
538
540
|
# diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
|
539
541
|
# clinical_notes: [{ category: CLINICAL, notes: [{ text: "string", author_name: "string", author_npi: "string", timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }] }],
|
540
542
|
# billing_notes: [{ text: "string" }],
|
@@ -547,7 +549,7 @@ module CandidApiClient
|
|
547
549
|
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
548
550
|
# )
|
549
551
|
def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
|
550
|
-
provider_accepts_assignment:, billable_status:,
|
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)
|
551
553
|
response = @request_client.conn.post do |req|
|
552
554
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
553
555
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -559,18 +561,17 @@ module CandidApiClient
|
|
559
561
|
req.body = {
|
560
562
|
**(request_options&.additional_body_parameters || {}),
|
561
563
|
external_id: external_id,
|
562
|
-
|
564
|
+
date_of_service: date_of_service,
|
565
|
+
end_date_of_service: end_date_of_service,
|
563
566
|
patient_authorized_release: patient_authorized_release,
|
564
567
|
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
565
568
|
provider_accepts_assignment: provider_accepts_assignment,
|
566
|
-
appointment_type: appointment_type,
|
567
569
|
existing_medications: existing_medications,
|
568
570
|
vitals: vitals,
|
569
571
|
interventions: interventions,
|
570
572
|
pay_to_address: pay_to_address,
|
571
573
|
synchronicity: synchronicity,
|
572
574
|
billable_status: billable_status,
|
573
|
-
responsible_party: responsible_party,
|
574
575
|
additional_information: additional_information,
|
575
576
|
service_authorization_exception_code: service_authorization_exception_code,
|
576
577
|
admission_date: admission_date,
|
@@ -580,8 +581,6 @@ module CandidApiClient
|
|
580
581
|
delay_reason_code: delay_reason_code,
|
581
582
|
additional_properties: additional_properties,
|
582
583
|
_field_set: _field_set,
|
583
|
-
date_of_service: date_of_service,
|
584
|
-
end_date_of_service: end_date_of_service,
|
585
584
|
patient: patient,
|
586
585
|
billing_provider: billing_provider,
|
587
586
|
rendering_provider: rendering_provider,
|
@@ -591,6 +590,9 @@ module CandidApiClient
|
|
591
590
|
service_facility: service_facility,
|
592
591
|
subscriber_primary: subscriber_primary,
|
593
592
|
subscriber_secondary: subscriber_secondary,
|
593
|
+
prior_authorization_number: prior_authorization_number,
|
594
|
+
appointment_type: appointment_type,
|
595
|
+
responsible_party: responsible_party,
|
594
596
|
diagnoses: diagnoses,
|
595
597
|
clinical_notes: clinical_notes,
|
596
598
|
billing_notes: billing_notes,
|
@@ -608,8 +610,27 @@ module CandidApiClient
|
|
608
610
|
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
609
611
|
end
|
610
612
|
|
611
|
-
#
|
612
|
-
#
|
613
|
+
# Create an encounter from a pre-encounter patient and appointment. This endpoint
|
614
|
+
# is intended to be used by consumers who are managing
|
615
|
+
# patients and appointments in the pre-encounter service and is currently under
|
616
|
+
# development. Consumers who are not taking advantage
|
617
|
+
# of the pre-encounter service should use the standard create endpoint.
|
618
|
+
# The endpoint will create an encounter from the provided fields, pulling
|
619
|
+
# information from the provided patient and appointment objects
|
620
|
+
# where applicable. In particular, the following fields are populated from the
|
621
|
+
# patient and appointment objects:
|
622
|
+
# - Patient
|
623
|
+
# - Referring Provider
|
624
|
+
# - Subscriber Primary
|
625
|
+
# - Subscriber Secondary
|
626
|
+
# - Prior Authorization Number
|
627
|
+
# - Appointment Type
|
628
|
+
# - Responsible Party
|
629
|
+
# - Guarantor
|
630
|
+
# Utilizing this endpoint opts you into automatic updating of the encounter when
|
631
|
+
# the patient or appointment is updated, assuming the
|
632
|
+
# encounter has not already been submitted or adjudicated.
|
633
|
+
#
|
613
634
|
# @param external_id [String] A client-specified unique ID to associate with this encounter;
|
614
635
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
615
636
|
# This field should not contain PHI.
|
@@ -617,21 +638,54 @@ module CandidApiClient
|
|
617
638
|
# This date must be the local date in the timezone where the service occurred.
|
618
639
|
# Box 24a on the CMS-1500 claim form.
|
619
640
|
# If service occurred over a range of dates, this should be the start date.
|
620
|
-
#
|
621
|
-
#
|
622
|
-
#
|
623
|
-
# date_of_service
|
624
|
-
#
|
625
|
-
#
|
626
|
-
#
|
627
|
-
# be
|
628
|
-
#
|
629
|
-
#
|
630
|
-
#
|
631
|
-
#
|
632
|
-
#
|
633
|
-
#
|
634
|
-
#
|
641
|
+
# date_of_service must be defined on either the encounter or the service lines but
|
642
|
+
# not both.
|
643
|
+
# If there are greater than zero service lines, it is recommended to specify
|
644
|
+
# date_of_service on the service_line instead of on the encounter to prepare for
|
645
|
+
# future API versions.
|
646
|
+
# @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
647
|
+
# This date must be the local date in the timezone where the service occurred.
|
648
|
+
# If omitted, the Encounter is assumed to be for a single day.
|
649
|
+
# Must not be temporally before the date_of_service field.
|
650
|
+
# If there are greater than zero service lines, it is recommended to specify
|
651
|
+
# end_date_of_service on the service_line instead of on the encounter to prepare
|
652
|
+
# for future API versions.
|
653
|
+
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
654
|
+
# for billing purpose.
|
655
|
+
# Box 12 on the CMS-1500 claim form.
|
656
|
+
# @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you,
|
657
|
+
# not them. If false, patient may receive reimbursement.
|
658
|
+
# Box 13 on the CMS-1500 claim form.
|
659
|
+
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
|
660
|
+
# to be made to you, not them.
|
661
|
+
# Box 27 on the CMS-1500 claim form.
|
662
|
+
# @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
|
663
|
+
# * :name (String)
|
664
|
+
# * :rx_cui (String)
|
665
|
+
# * :dosage (String)
|
666
|
+
# * :dosage_form (String)
|
667
|
+
# * :frequency (String)
|
668
|
+
# * :as_needed (Boolean)
|
669
|
+
# @param vitals [Hash] Request of type CandidApiClient::Encounters::V4::Types::Vitals, as a Hash
|
670
|
+
# * :height_in (Integer)
|
671
|
+
# * :weight_lbs (Integer)
|
672
|
+
# * :blood_pressure_systolic_mmhg (Integer)
|
673
|
+
# * :blood_pressure_diastolic_mmhg (Integer)
|
674
|
+
# * :body_temperature_f (Float)
|
675
|
+
# * :hemoglobin_gdl (Float)
|
676
|
+
# * :hematocrit_pct (Float)
|
677
|
+
# @param interventions [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Intervention>, as a Hash
|
678
|
+
# * :name (String)
|
679
|
+
# * :category (CandidApiClient::Encounters::V4::Types::InterventionCategory)
|
680
|
+
# * :description (String)
|
681
|
+
# * :medication (Hash)
|
682
|
+
# * :name (String)
|
683
|
+
# * :rx_cui (String)
|
684
|
+
# * :dosage (String)
|
685
|
+
# * :dosage_form (String)
|
686
|
+
# * :frequency (String)
|
687
|
+
# * :as_needed (Boolean)
|
688
|
+
# * :labs (Array<CandidApiClient::Encounters::V4::Types::Lab>)
|
635
689
|
# @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type CandidApiClient::Commons::Types::StreetAddressLongZip, as a Hash
|
636
690
|
# * :zip_plus_four_code (String)
|
637
691
|
# * :address_1 (String)
|
@@ -639,177 +693,230 @@ module CandidApiClient
|
|
639
693
|
# * :city (String)
|
640
694
|
# * :state (CandidApiClient::Commons::Types::State)
|
641
695
|
# * :zip_code (String)
|
696
|
+
# @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
|
697
|
+
# Asynchronous encounters occur when providers and patients communicate online
|
698
|
+
# using
|
699
|
+
# forms, instant messaging, or other pre-recorded digital mediums.
|
700
|
+
# Synchronous encounters occur in live, real-time settings where the patient
|
701
|
+
# interacts
|
702
|
+
# directly with the provider, such as over video or a phone call.
|
642
703
|
# @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
|
643
|
-
# Examples for when this should be set to NOT_BILLABLE include
|
644
|
-
# has not occurred yet or if there is no intention of ever
|
645
|
-
# responsible_party.
|
646
|
-
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
|
647
|
-
# SELF_PAY if you intend to bill self pay/cash pay.
|
648
|
-
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments to
|
649
|
-
# be made to you, not them. Box 27 on the CMS-1500 claim form.
|
650
|
-
# @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you, not
|
651
|
-
# them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim
|
652
|
-
# form.
|
653
|
-
# @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter. Asynchronous
|
654
|
-
# encounters occur when providers and patients communicate online using forms,
|
655
|
-
# instant messaging, or other pre-recorded digital mediums. Synchronous encounters
|
656
|
-
# occur in live, real-time settings where the patient interacts directly with the
|
657
|
-
# provider, such as over video or a phone call.
|
658
|
-
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. Line-level place of service is not currently
|
659
|
-
# supported. 02 for telemedicine, 11 for in-person. Full list
|
660
|
-
# //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
661
|
-
# @param place_of_service_code_as_submitted [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. Line-level place of service is not currently
|
662
|
-
# supported. 02 for telemedicine, 11 for in-person. Full list
|
663
|
-
# //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
664
|
-
# @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
665
|
-
# Headaches").
|
666
|
-
# @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
667
|
-
# This date must be the local date in the timezone where the service occurred.
|
668
|
-
# If omitted, the Encounter is assumed to be for a single day.
|
669
|
-
# Must not be temporally before the date_of_service field.
|
670
|
-
# If service lines have distinct end_date_of_service values, updating the
|
671
|
-
# encounter's end_date_of_service will fail. If all service line
|
672
|
-
# end_date_of_service values are the same, updating the encounter's
|
673
|
-
# end_date_of_service will update all service line date_of_service values.
|
674
|
-
# @param subscriber_primary [Hash] Contains details of the primary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
675
|
-
# * :insurance_card (Hash)
|
676
|
-
# * :member_id (String)
|
677
|
-
# * :payer_name (String)
|
678
|
-
# * :payer_id (String)
|
679
|
-
# * :rx_bin (String)
|
680
|
-
# * :rx_pcn (String)
|
681
|
-
# * :image_url_front (String)
|
682
|
-
# * :image_url_back (String)
|
683
|
-
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
684
|
-
# * :group_number (String)
|
685
|
-
# * :plan_name (String)
|
686
|
-
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
687
|
-
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
688
|
-
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
689
|
-
# * :date_of_birth (Date)
|
690
|
-
# * :address (Hash)
|
691
|
-
# * :zip_plus_four_code (String)
|
692
|
-
# * :address_1 (String)
|
693
|
-
# * :address_2 (String)
|
694
|
-
# * :city (String)
|
695
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
696
|
-
# * :zip_code (String)
|
697
|
-
# * :first_name (String)
|
698
|
-
# * :last_name (String)
|
699
|
-
# * :gender (CandidApiClient::Individual::Types::Gender)
|
700
|
-
# @param subscriber_secondary [Hash] Contains details of the secondary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
701
|
-
# * :insurance_card (Hash)
|
702
|
-
# * :member_id (String)
|
703
|
-
# * :payer_name (String)
|
704
|
-
# * :payer_id (String)
|
705
|
-
# * :rx_bin (String)
|
706
|
-
# * :rx_pcn (String)
|
707
|
-
# * :image_url_front (String)
|
708
|
-
# * :image_url_back (String)
|
709
|
-
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
710
|
-
# * :group_number (String)
|
711
|
-
# * :plan_name (String)
|
712
|
-
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
713
|
-
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
714
|
-
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
715
|
-
# * :date_of_birth (Date)
|
716
|
-
# * :address (Hash)
|
717
|
-
# * :zip_plus_four_code (String)
|
718
|
-
# * :address_1 (String)
|
719
|
-
# * :address_2 (String)
|
720
|
-
# * :city (String)
|
721
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
722
|
-
# * :zip_code (String)
|
723
|
-
# * :first_name (String)
|
724
|
-
# * :last_name (String)
|
725
|
-
# * :gender (CandidApiClient::Individual::Types::Gender)
|
704
|
+
# Examples for when this should be set to NOT_BILLABLE include
|
705
|
+
# if the Encounter has not occurred yet or if there is no intention of ever
|
706
|
+
# billing the responsible_party.
|
726
707
|
# @param additional_information [String] Defines additional information on the claim needed by the payer.
|
727
708
|
# Box 19 on the CMS-1500 claim form.
|
728
|
-
# @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF
|
709
|
+
# @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
|
729
710
|
# Required when mandated by government law or regulation to obtain authorization
|
730
711
|
# for specific service(s) but, for the
|
731
712
|
# reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
|
732
713
|
# the service was performed without
|
733
714
|
# obtaining the authorization.
|
734
|
-
# @param admission_date [Date] 837p Loop2300 DTP
|
715
|
+
# @param admission_date [Date] 837p Loop2300 DTP\*435, CMS-1500 Box 18
|
735
716
|
# Required on all ambulance claims when the patient was known to be admitted to
|
736
717
|
# the hospital.
|
737
718
|
# OR
|
738
719
|
# Required on all claims involving inpatient medical visits.
|
739
|
-
# @param discharge_date [Date] 837p Loop2300 DTP
|
720
|
+
# @param discharge_date [Date] 837p Loop2300 DTP\*096, CMS-1500 Box 18
|
740
721
|
# Required for inpatient claims when the patient was discharged from the facility
|
741
722
|
# and the discharge date is known.
|
742
|
-
# @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP
|
723
|
+
# @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP\*431, CMS-1500 Box 14
|
743
724
|
# Required for the initial medical service or visit performed in response to a
|
744
725
|
# medical emergency when the date is available and is different than the date of
|
745
726
|
# service.
|
746
727
|
# OR
|
747
728
|
# This date is the onset of acute symptoms for the current illness or condition.
|
748
|
-
# @param last_menstrual_period_date [Date] 837p Loop2300 DTP
|
729
|
+
# @param last_menstrual_period_date [Date] 837p Loop2300 DTP\*484, CMS-1500 Box 14
|
749
730
|
# Required when, in the judgment of the provider, the services on this claim are
|
750
731
|
# related to the patient's pregnancy.
|
751
732
|
# @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
|
752
733
|
# Code indicating the reason why a request was delayed
|
753
|
-
# @param
|
754
|
-
#
|
755
|
-
#
|
756
|
-
# @param
|
757
|
-
#
|
758
|
-
#
|
759
|
-
#
|
760
|
-
#
|
761
|
-
#
|
762
|
-
#
|
763
|
-
#
|
764
|
-
#
|
765
|
-
#
|
766
|
-
#
|
767
|
-
#
|
768
|
-
#
|
769
|
-
#
|
770
|
-
#
|
771
|
-
#
|
772
|
-
#
|
773
|
-
# * :
|
774
|
-
# * :
|
775
|
-
#
|
776
|
-
#
|
777
|
-
#
|
778
|
-
#
|
779
|
-
#
|
780
|
-
#
|
781
|
-
#
|
782
|
-
#
|
783
|
-
#
|
784
|
-
#
|
785
|
-
#
|
786
|
-
#
|
787
|
-
#
|
788
|
-
#
|
789
|
-
#
|
790
|
-
#
|
791
|
-
#
|
792
|
-
#
|
734
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
735
|
+
# @param _field_set [Object]
|
736
|
+
# @param pre_encounter_patient_id [String]
|
737
|
+
# @param pre_encounter_appointment_id [String]
|
738
|
+
# @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
|
739
|
+
# Billing provider may be, but is not necessarily, the same person/NPI as the
|
740
|
+
# rendering provider. From a payer's perspective, this represents the person or
|
741
|
+
# entity being reimbursed. When a contract exists with the target payer, the
|
742
|
+
# billing provider should be the entity contracted with the payer. In some
|
743
|
+
# circumstances, this will be an individual provider. In that case, submit that
|
744
|
+
# provider's NPI and the tax ID (TIN) that the provider gave to the payer during
|
745
|
+
# contracting. In other cases, the billing entity will be a medical group. If so,
|
746
|
+
# submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim form.Request of type CandidApiClient::EncounterProviders::V2::Types::BillingProvider, as a Hash
|
747
|
+
# * :address (Hash)
|
748
|
+
# * :zip_plus_four_code (String)
|
749
|
+
# * :address_1 (String)
|
750
|
+
# * :address_2 (String)
|
751
|
+
# * :city (String)
|
752
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
753
|
+
# * :zip_code (String)
|
754
|
+
# * :tax_id (String)
|
755
|
+
# * :npi (String)
|
756
|
+
# * :taxonomy_code (String)
|
757
|
+
# * :first_name (String)
|
758
|
+
# * :last_name (String)
|
759
|
+
# * :organization_name (String)
|
760
|
+
# @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
|
761
|
+
# etc. -- performing the service.
|
762
|
+
# For telehealth services, the rendering provider performs the visit, asynchronous
|
763
|
+
# communication, or other service. The rendering provider address should generally
|
764
|
+
# be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProvider, as a Hash
|
765
|
+
# * :address (Hash)
|
766
|
+
# * :zip_plus_four_code (String)
|
767
|
+
# * :address_1 (String)
|
768
|
+
# * :address_2 (String)
|
769
|
+
# * :city (String)
|
770
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
771
|
+
# * :zip_code (String)
|
772
|
+
# * :npi (String)
|
773
|
+
# * :taxonomy_code (String)
|
774
|
+
# * :first_name (String)
|
775
|
+
# * :last_name (String)
|
776
|
+
# * :organization_name (String)
|
777
|
+
# @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
|
778
|
+
# this loop to
|
779
|
+
# indicate the initial referral from the primary care provider or whatever
|
780
|
+
# provider wrote the initial referral for this patient's episode of care being
|
781
|
+
# billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider, as a Hash
|
782
|
+
# * :npi (String)
|
783
|
+
# * :taxonomy_code (String)
|
784
|
+
# * :address (Hash)
|
785
|
+
# * :zip_plus_four_code (String)
|
786
|
+
# * :address_1 (String)
|
787
|
+
# * :address_2 (String)
|
788
|
+
# * :city (String)
|
789
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
790
|
+
# * :zip_code (String)
|
791
|
+
# * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
|
792
|
+
# * :first_name (String)
|
793
|
+
# * :last_name (String)
|
794
|
+
# * :organization_name (String)
|
795
|
+
# @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
|
796
|
+
# required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider, as a Hash
|
797
|
+
# * :npi (String)
|
798
|
+
# * :taxonomy_code (String)
|
799
|
+
# * :address (Hash)
|
800
|
+
# * :zip_plus_four_code (String)
|
801
|
+
# * :address_1 (String)
|
802
|
+
# * :address_2 (String)
|
803
|
+
# * :city (String)
|
804
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
805
|
+
# * :zip_code (String)
|
806
|
+
# * :first_name (String)
|
807
|
+
# * :last_name (String)
|
808
|
+
# * :organization_name (String)
|
809
|
+
# @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
|
810
|
+
# rendered, such as a provider office or hospital. For telehealth, service
|
811
|
+
# facility can represent the provider's location when the service was delivered
|
812
|
+
# (e.g., home), or the location where an in-person visit would have taken place,
|
813
|
+
# whichever is easier to identify. If the provider is in-network, service facility
|
814
|
+
# may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
|
815
|
+
# for an in-network claim to be successfully adjudicated, the service facility
|
816
|
+
# address listed on claims must match what was provided to the payer during the
|
817
|
+
# credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase, as a Hash
|
818
|
+
# * :organization_name (String)
|
819
|
+
# * :npi (String)
|
820
|
+
# * :address (Hash)
|
821
|
+
# * :zip_plus_four_code (String)
|
822
|
+
# * :address_1 (String)
|
823
|
+
# * :address_2 (String)
|
824
|
+
# * :city (String)
|
825
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
826
|
+
# * :zip_code (String)
|
827
|
+
# @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
828
|
+
# diagnoses
|
829
|
+
# may be submitted at this time, and coders will later prioritize the 12 that will
|
830
|
+
# be
|
831
|
+
# submitted to the payor.Request of type Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>, as a Hash
|
832
|
+
# * :name (String)
|
833
|
+
# * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
|
834
|
+
# * :code (String)
|
835
|
+
# @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
|
836
|
+
# patient encounters.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
|
837
|
+
# * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
|
838
|
+
# * :notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNote>)
|
839
|
+
# @param billing_notes [Array<Hash>] Spot to store misc, human-readable, notes about this encounter to be used
|
840
|
+
# in the billing process.Request of type Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>, as a Hash
|
841
|
+
# * :text (String)
|
842
|
+
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. Line-level place of service is not currently
|
843
|
+
# supported. 02 for telemedicine, 11 for in-person. Full list
|
844
|
+
# //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
845
|
+
# @param patient_histories [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>, as a Hash
|
846
|
+
# * :category (CandidApiClient::Encounters::V4::Types::PatientHistoryCategoryEnum)
|
847
|
+
# * :questions (Array<CandidApiClient::Encounters::V4::Types::IntakeQuestion>)
|
848
|
+
# @param service_lines [Array<Hash>] Each service line must be linked to a diagnosis. Concretely,
|
849
|
+
# `service_line.diagnosis_pointers`must contain at least one entry which should be
|
850
|
+
# in bounds of the diagnoses list field.Request of type Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>, as a Hash
|
851
|
+
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
852
|
+
# * :procedure_code (String)
|
853
|
+
# * :quantity (String)
|
854
|
+
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
855
|
+
# * :charge_amount_cents (Integer)
|
856
|
+
# * :diagnosis_pointers (Array<Integer>)
|
857
|
+
# * :drug_identification (Hash)
|
858
|
+
# * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
|
859
|
+
# * :national_drug_code (String)
|
860
|
+
# * :national_drug_unit_count (String)
|
861
|
+
# * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
|
862
|
+
# * :link_sequence_number (String)
|
863
|
+
# * :pharmacy_prescription_number (String)
|
864
|
+
# * :conversion_formula (String)
|
865
|
+
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
866
|
+
# * :description (String)
|
867
|
+
# * :date_of_service (Date)
|
868
|
+
# * :end_date_of_service (Date)
|
869
|
+
# * :ordering_provider (Hash)
|
870
|
+
# * :npi (String)
|
871
|
+
# * :taxonomy_code (String)
|
872
|
+
# * :address (Hash)
|
873
|
+
# * :zip_plus_four_code (String)
|
874
|
+
# * :address_1 (String)
|
875
|
+
# * :address_2 (String)
|
876
|
+
# * :city (String)
|
877
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
878
|
+
# * :zip_code (String)
|
879
|
+
# * :first_name (String)
|
880
|
+
# * :last_name (String)
|
881
|
+
# * :organization_name (String)
|
882
|
+
# @param external_claim_submission [Hash] ***This field is in beta.***
|
883
|
+
# To be included for claims that have been submitted outside of Candid.
|
884
|
+
# Candid supports posting remits and payments to these claims and working them
|
885
|
+
# in-platform (e.g. editing, resubmitting).Request of type CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate, as a Hash
|
886
|
+
# * :claim_created_at (DateTime)
|
887
|
+
# * :patient_control_number (String)
|
888
|
+
# * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
|
889
|
+
# @param tag_ids [Array<String>] Names of tags that should be on the encounter.
|
890
|
+
# @param schema_instances [Array<Hash>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
|
891
|
+
# Multiple schema
|
892
|
+
# instances cannot be created for the same schema on an encounter.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
|
893
|
+
# * :schema_id (String)
|
894
|
+
# * :content (Hash{String => Object})
|
895
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
896
|
+
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
897
|
+
# @example
|
898
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
899
|
+
# api.encounters.v_4.create_from_pre_encounter_patient(
|
900
|
+
# pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
901
|
+
# pre_encounter_appointment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
902
|
+
# 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" },
|
904
|
+
# 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
|
+
# 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
|
+
# 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" } },
|
907
|
+
# diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
|
908
|
+
# clinical_notes: [{ category: CLINICAL, notes: [{ text: "string", author_name: "string", author_npi: "string", timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }] }],
|
909
|
+
# billing_notes: [{ text: "string" }],
|
793
910
|
# place_of_service_code: PHARMACY,
|
794
|
-
#
|
795
|
-
#
|
796
|
-
#
|
797
|
-
#
|
798
|
-
#
|
799
|
-
# additional_information: "string",
|
800
|
-
# service_authorization_exception_code: C_1,
|
801
|
-
# admission_date: DateTime.parse(2023-01-15),
|
802
|
-
# discharge_date: DateTime.parse(2023-01-15),
|
803
|
-
# onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15),
|
804
|
-
# last_menstrual_period_date: DateTime.parse(2023-01-15),
|
805
|
-
# delay_reason_code: C_1,
|
806
|
-
# patient_authorized_release: true,
|
807
|
-
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
|
808
|
-
# 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 }
|
911
|
+
# patient_histories: [{ category: PRESENT_ILLNESS, questions: [{ id: "6E7FBCE4-A8EA-46D0-A8D8-FF83CA3BB176", text: "Do you have any allergies?", responses: [{ response: "No allergies", follow_ups: [{ id: "4F3D57F9-AC94-49D6-87E4-E804B709917A", text: "Do you have any allergies?", response: "No allergies" }] }] }] }],
|
912
|
+
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" } }],
|
913
|
+
# external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] },
|
914
|
+
# tag_ids: ["string"],
|
915
|
+
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
809
916
|
# )
|
810
|
-
def
|
811
|
-
|
812
|
-
response = @request_client.conn.
|
917
|
+
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)
|
919
|
+
response = @request_client.conn.post do |req|
|
813
920
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
814
921
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
815
922
|
req.headers = {
|
@@ -819,24 +926,18 @@ module CandidApiClient
|
|
819
926
|
}.compact
|
820
927
|
req.body = {
|
821
928
|
**(request_options&.additional_body_parameters || {}),
|
822
|
-
prior_authorization_number: prior_authorization_number,
|
823
929
|
external_id: external_id,
|
824
930
|
date_of_service: date_of_service,
|
825
|
-
|
826
|
-
|
827
|
-
clinical_notes: clinical_notes,
|
828
|
-
pay_to_address: pay_to_address,
|
829
|
-
billable_status: billable_status,
|
830
|
-
responsible_party: responsible_party,
|
831
|
-
provider_accepts_assignment: provider_accepts_assignment,
|
931
|
+
end_date_of_service: end_date_of_service,
|
932
|
+
patient_authorized_release: patient_authorized_release,
|
832
933
|
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
934
|
+
provider_accepts_assignment: provider_accepts_assignment,
|
935
|
+
existing_medications: existing_medications,
|
936
|
+
vitals: vitals,
|
937
|
+
interventions: interventions,
|
938
|
+
pay_to_address: pay_to_address,
|
833
939
|
synchronicity: synchronicity,
|
834
|
-
|
835
|
-
place_of_service_code_as_submitted: place_of_service_code_as_submitted,
|
836
|
-
appointment_type: appointment_type,
|
837
|
-
end_date_of_service: end_date_of_service,
|
838
|
-
subscriber_primary: subscriber_primary,
|
839
|
-
subscriber_secondary: subscriber_secondary,
|
940
|
+
billable_status: billable_status,
|
840
941
|
additional_information: additional_information,
|
841
942
|
service_authorization_exception_code: service_authorization_exception_code,
|
842
943
|
admission_date: admission_date,
|
@@ -844,114 +945,814 @@ module CandidApiClient
|
|
844
945
|
onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
|
845
946
|
last_menstrual_period_date: last_menstrual_period_date,
|
846
947
|
delay_reason_code: delay_reason_code,
|
847
|
-
|
848
|
-
|
849
|
-
|
948
|
+
additional_properties: additional_properties,
|
949
|
+
_field_set: _field_set,
|
950
|
+
pre_encounter_patient_id: pre_encounter_patient_id,
|
951
|
+
pre_encounter_appointment_id: pre_encounter_appointment_id,
|
952
|
+
billing_provider: billing_provider,
|
953
|
+
rendering_provider: rendering_provider,
|
954
|
+
initial_referring_provider: initial_referring_provider,
|
955
|
+
supervising_provider: supervising_provider,
|
956
|
+
service_facility: service_facility,
|
957
|
+
diagnoses: diagnoses,
|
958
|
+
clinical_notes: clinical_notes,
|
959
|
+
billing_notes: billing_notes,
|
960
|
+
place_of_service_code: place_of_service_code,
|
961
|
+
patient_histories: patient_histories,
|
962
|
+
service_lines: service_lines,
|
963
|
+
external_claim_submission: external_claim_submission,
|
964
|
+
tag_ids: tag_ids,
|
965
|
+
schema_instances: schema_instances
|
850
966
|
}.compact
|
851
967
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
852
|
-
request_options: request_options)}/api/encounters/v4
|
968
|
+
request_options: request_options)}/api/encounters/v4/create-from-pre-encounter"
|
853
969
|
end
|
854
970
|
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
855
971
|
end
|
856
|
-
end
|
857
|
-
|
858
|
-
class AsyncV4Client
|
859
|
-
# @return [CandidApiClient::AsyncRequestClient]
|
860
|
-
attr_reader :request_client
|
861
|
-
|
862
|
-
# @param request_client [CandidApiClient::AsyncRequestClient]
|
863
|
-
# @return [CandidApiClient::Encounters::V4::AsyncV4Client]
|
864
|
-
def initialize(request_client:)
|
865
|
-
@request_client = request_client
|
866
|
-
end
|
867
972
|
|
868
|
-
# @param
|
869
|
-
# @param
|
870
|
-
# @param
|
871
|
-
#
|
872
|
-
#
|
873
|
-
# @param
|
874
|
-
#
|
875
|
-
#
|
876
|
-
#
|
877
|
-
#
|
878
|
-
#
|
879
|
-
#
|
880
|
-
#
|
881
|
-
#
|
882
|
-
#
|
883
|
-
#
|
973
|
+
# @param encounter_id [String]
|
974
|
+
# @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
|
975
|
+
# @param external_id [String] A client-specified unique ID to associate with this encounter;
|
976
|
+
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
977
|
+
# This field should not contain PHI.
|
978
|
+
# @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
979
|
+
# This date must be the local date in the timezone where the service occurred.
|
980
|
+
# Box 24a on the CMS-1500 claim form.
|
981
|
+
# If service occurred over a range of dates, this should be the start date.
|
982
|
+
# If service lines have distinct date_of_service values, updating the encounter's
|
983
|
+
# date_of_service will fail. If all service line date_of_service values are the
|
984
|
+
# same, updating the encounter's date_of_service will update all service line
|
985
|
+
# date_of_service values.
|
986
|
+
# @param diagnosis_ids [Array<String>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
987
|
+
# diagnoses
|
988
|
+
# may be submitted at this time, and coders will later prioritize the 12 that will
|
989
|
+
# be
|
990
|
+
# submitted to the payor.
|
991
|
+
# @param tag_ids [Array<String>] Names of tags that should be on the encounter. Note all tags on encounter will
|
992
|
+
# be overridden with this list.
|
993
|
+
# @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
|
994
|
+
# patient encounters.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
|
995
|
+
# * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
|
996
|
+
# * :notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNote>)
|
997
|
+
# @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type CandidApiClient::Commons::Types::StreetAddressLongZip, as a Hash
|
998
|
+
# * :zip_plus_four_code (String)
|
999
|
+
# * :address_1 (String)
|
1000
|
+
# * :address_2 (String)
|
1001
|
+
# * :city (String)
|
1002
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1003
|
+
# * :zip_code (String)
|
884
1004
|
# @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
|
885
1005
|
# Examples for when this should be set to NOT_BILLABLE include if the Encounter
|
886
1006
|
# has not occurred yet or if there is no intention of ever billing the
|
887
1007
|
# responsible_party.
|
888
1008
|
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
|
889
1009
|
# SELF_PAY if you intend to bill self pay/cash pay.
|
890
|
-
# @param
|
891
|
-
#
|
892
|
-
# @param
|
893
|
-
#
|
894
|
-
#
|
895
|
-
# @
|
896
|
-
#
|
897
|
-
#
|
898
|
-
#
|
899
|
-
#
|
900
|
-
#
|
901
|
-
#
|
902
|
-
#
|
903
|
-
#
|
904
|
-
#
|
905
|
-
#
|
906
|
-
#
|
907
|
-
#
|
908
|
-
#
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
#
|
1010
|
+
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments to
|
1011
|
+
# be made to you, not them. Box 27 on the CMS-1500 claim form.
|
1012
|
+
# @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you, not
|
1013
|
+
# them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim
|
1014
|
+
# form.
|
1015
|
+
# @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter. Asynchronous
|
1016
|
+
# encounters occur when providers and patients communicate online using forms,
|
1017
|
+
# instant messaging, or other pre-recorded digital mediums. Synchronous encounters
|
1018
|
+
# occur in live, real-time settings where the patient interacts directly with the
|
1019
|
+
# provider, such as over video or a phone call.
|
1020
|
+
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. Line-level place of service is not currently
|
1021
|
+
# supported. 02 for telemedicine, 11 for in-person. Full list
|
1022
|
+
# //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
1023
|
+
# @param place_of_service_code_as_submitted [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. Line-level place of service is not currently
|
1024
|
+
# supported. 02 for telemedicine, 11 for in-person. Full list
|
1025
|
+
# //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
1026
|
+
# @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
1027
|
+
# Headaches").
|
1028
|
+
# @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1029
|
+
# This date must be the local date in the timezone where the service occurred.
|
1030
|
+
# If omitted, the Encounter is assumed to be for a single day.
|
1031
|
+
# Must not be temporally before the date_of_service field.
|
1032
|
+
# If service lines have distinct end_date_of_service values, updating the
|
1033
|
+
# encounter's end_date_of_service will fail. If all service line
|
1034
|
+
# end_date_of_service values are the same, updating the encounter's
|
1035
|
+
# end_date_of_service will update all service line date_of_service values.
|
1036
|
+
# @param subscriber_primary [Hash] Contains details of the primary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
1037
|
+
# * :insurance_card (Hash)
|
1038
|
+
# * :member_id (String)
|
1039
|
+
# * :payer_name (String)
|
1040
|
+
# * :payer_id (String)
|
1041
|
+
# * :rx_bin (String)
|
1042
|
+
# * :rx_pcn (String)
|
1043
|
+
# * :image_url_front (String)
|
1044
|
+
# * :image_url_back (String)
|
1045
|
+
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1046
|
+
# * :group_number (String)
|
1047
|
+
# * :plan_name (String)
|
1048
|
+
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1049
|
+
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1050
|
+
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1051
|
+
# * :date_of_birth (Date)
|
1052
|
+
# * :address (Hash)
|
1053
|
+
# * :zip_plus_four_code (String)
|
1054
|
+
# * :address_1 (String)
|
1055
|
+
# * :address_2 (String)
|
1056
|
+
# * :city (String)
|
1057
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1058
|
+
# * :zip_code (String)
|
1059
|
+
# * :first_name (String)
|
1060
|
+
# * :last_name (String)
|
1061
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1062
|
+
# @param subscriber_secondary [Hash] Contains details of the secondary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
1063
|
+
# * :insurance_card (Hash)
|
1064
|
+
# * :member_id (String)
|
1065
|
+
# * :payer_name (String)
|
1066
|
+
# * :payer_id (String)
|
1067
|
+
# * :rx_bin (String)
|
1068
|
+
# * :rx_pcn (String)
|
1069
|
+
# * :image_url_front (String)
|
1070
|
+
# * :image_url_back (String)
|
1071
|
+
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1072
|
+
# * :group_number (String)
|
1073
|
+
# * :plan_name (String)
|
1074
|
+
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1075
|
+
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1076
|
+
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1077
|
+
# * :date_of_birth (Date)
|
1078
|
+
# * :address (Hash)
|
1079
|
+
# * :zip_plus_four_code (String)
|
1080
|
+
# * :address_1 (String)
|
1081
|
+
# * :address_2 (String)
|
1082
|
+
# * :city (String)
|
1083
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1084
|
+
# * :zip_code (String)
|
1085
|
+
# * :first_name (String)
|
1086
|
+
# * :last_name (String)
|
1087
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1088
|
+
# @param additional_information [String] Defines additional information on the claim needed by the payer.
|
1089
|
+
# Box 19 on the CMS-1500 claim form.
|
1090
|
+
# @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
|
1091
|
+
# Required when mandated by government law or regulation to obtain authorization
|
1092
|
+
# for specific service(s) but, for the
|
1093
|
+
# reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
|
1094
|
+
# the service was performed without
|
1095
|
+
# obtaining the authorization.
|
1096
|
+
# @param admission_date [Date] 837p Loop2300 DTP*435, CMS-1500 Box 18
|
1097
|
+
# Required on all ambulance claims when the patient was known to be admitted to
|
1098
|
+
# the hospital.
|
1099
|
+
# OR
|
1100
|
+
# Required on all claims involving inpatient medical visits.
|
1101
|
+
# @param discharge_date [Date] 837p Loop2300 DTP*096, CMS-1500 Box 18
|
1102
|
+
# Required for inpatient claims when the patient was discharged from the facility
|
1103
|
+
# and the discharge date is known.
|
1104
|
+
# @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP*431, CMS-1500 Box 14
|
1105
|
+
# Required for the initial medical service or visit performed in response to a
|
1106
|
+
# medical emergency when the date is available and is different than the date of
|
1107
|
+
# service.
|
1108
|
+
# OR
|
1109
|
+
# This date is the onset of acute symptoms for the current illness or condition.
|
1110
|
+
# @param last_menstrual_period_date [Date] 837p Loop2300 DTP*484, CMS-1500 Box 14
|
1111
|
+
# Required when, in the judgment of the provider, the services on this claim are
|
1112
|
+
# related to the patient's pregnancy.
|
1113
|
+
# @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
|
1114
|
+
# Code indicating the reason why a request was delayed
|
1115
|
+
# @param patient [Hash] Contains the identification information of the individual receiving medical
|
1116
|
+
# services.Request of type CandidApiClient::Individual::Types::PatientUpdate, as a Hash
|
1117
|
+
# * :first_name (String)
|
1118
|
+
# * :last_name (String)
|
1119
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1120
|
+
# * :external_id (String)
|
1121
|
+
# * :date_of_birth (Date)
|
1122
|
+
# * :address (Hash)
|
1123
|
+
# * :zip_plus_four_code (String)
|
1124
|
+
# * :address_1 (String)
|
1125
|
+
# * :address_2 (String)
|
1126
|
+
# * :city (String)
|
1127
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1128
|
+
# * :zip_code (String)
|
1129
|
+
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1130
|
+
# * :phone_consent (Boolean)
|
1131
|
+
# * :email (String)
|
1132
|
+
# * :email_consent (Boolean)
|
1133
|
+
# * :non_insurance_payers (Array<String>)
|
1134
|
+
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
1135
|
+
# for billing purpose.
|
1136
|
+
# Box 12 on the CMS-1500 claim form.
|
1137
|
+
# @param schema_instances [Array<Hash>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
|
1138
|
+
# Multiple schema
|
1139
|
+
# instances cannot be created for the same schema on an encounter. Updating schema
|
1140
|
+
# instances utilizes PUT
|
1141
|
+
# semantics, so the schema instances on the encounter will be set to whatever
|
1142
|
+
# inputs are provided. If null
|
1143
|
+
# is provided as an input, then the encounter's schema instances will be cleared.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
|
1144
|
+
# * :schema_id (String)
|
1145
|
+
# * :content (Hash{String => Object})
|
1146
|
+
# @param vitals [Hash] If a vitals entity already exists for the encounter, then all values will be
|
1147
|
+
# updated to the provided values.
|
1148
|
+
# Otherwise, a new vitals object will be created for the encounter.Request of type CandidApiClient::Encounters::V4::Types::VitalsUpdate, as a Hash
|
1149
|
+
# * :height_in (Integer)
|
1150
|
+
# * :weight_lbs (Integer)
|
1151
|
+
# * :blood_pressure_systolic_mmhg (Integer)
|
1152
|
+
# * :blood_pressure_diastolic_mmhg (Integer)
|
1153
|
+
# * :body_temperature_f (Float)
|
1154
|
+
# * :hemoglobin_gdl (Float)
|
1155
|
+
# * :hematocrit_pct (Float)
|
947
1156
|
# @param request_options [CandidApiClient::RequestOptions]
|
948
1157
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
949
1158
|
# @example
|
950
1159
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
951
|
-
# api.encounters.v_4.
|
952
|
-
|
1160
|
+
# api.encounters.v_4.update(
|
1161
|
+
# encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
1162
|
+
# prior_authorization_number: "string",
|
1163
|
+
# external_id: "string",
|
1164
|
+
# date_of_service: DateTime.parse(2023-01-15),
|
1165
|
+
# diagnosis_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"],
|
1166
|
+
# tag_ids: ["string"],
|
1167
|
+
# clinical_notes: [{ category: CLINICAL, notes: [{ text: "string", author_name: "string", author_npi: "string", timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }] }],
|
1168
|
+
# pay_to_address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" },
|
1169
|
+
# billable_status: BILLABLE,
|
1170
|
+
# responsible_party: INSURANCE_PAY,
|
1171
|
+
# provider_accepts_assignment: true,
|
1172
|
+
# benefits_assigned_to_provider: true,
|
1173
|
+
# synchronicity: SYNCHRONOUS,
|
1174
|
+
# place_of_service_code: PHARMACY,
|
1175
|
+
# place_of_service_code_as_submitted: PHARMACY,
|
1176
|
+
# appointment_type: "string",
|
1177
|
+
# end_date_of_service: DateTime.parse(2023-01-15),
|
1178
|
+
# 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 },
|
1179
|
+
# 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 },
|
1180
|
+
# additional_information: "string",
|
1181
|
+
# service_authorization_exception_code: C_1,
|
1182
|
+
# admission_date: DateTime.parse(2023-01-15),
|
1183
|
+
# discharge_date: DateTime.parse(2023-01-15),
|
1184
|
+
# onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15),
|
1185
|
+
# last_menstrual_period_date: DateTime.parse(2023-01-15),
|
1186
|
+
# delay_reason_code: C_1,
|
1187
|
+
# 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
|
+
# patient_authorized_release: true,
|
1189
|
+
# 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 }
|
1191
|
+
# )
|
1192
|
+
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)
|
1194
|
+
response = @request_client.conn.patch do |req|
|
1195
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1196
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1197
|
+
req.headers = {
|
1198
|
+
**(req.headers || {}),
|
1199
|
+
**@request_client.get_headers,
|
1200
|
+
**(request_options&.additional_headers || {})
|
1201
|
+
}.compact
|
1202
|
+
req.body = {
|
1203
|
+
**(request_options&.additional_body_parameters || {}),
|
1204
|
+
prior_authorization_number: prior_authorization_number,
|
1205
|
+
external_id: external_id,
|
1206
|
+
date_of_service: date_of_service,
|
1207
|
+
diagnosis_ids: diagnosis_ids,
|
1208
|
+
tag_ids: tag_ids,
|
1209
|
+
clinical_notes: clinical_notes,
|
1210
|
+
pay_to_address: pay_to_address,
|
1211
|
+
billable_status: billable_status,
|
1212
|
+
responsible_party: responsible_party,
|
1213
|
+
provider_accepts_assignment: provider_accepts_assignment,
|
1214
|
+
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
1215
|
+
synchronicity: synchronicity,
|
1216
|
+
place_of_service_code: place_of_service_code,
|
1217
|
+
place_of_service_code_as_submitted: place_of_service_code_as_submitted,
|
1218
|
+
appointment_type: appointment_type,
|
1219
|
+
end_date_of_service: end_date_of_service,
|
1220
|
+
subscriber_primary: subscriber_primary,
|
1221
|
+
subscriber_secondary: subscriber_secondary,
|
1222
|
+
additional_information: additional_information,
|
1223
|
+
service_authorization_exception_code: service_authorization_exception_code,
|
1224
|
+
admission_date: admission_date,
|
1225
|
+
discharge_date: discharge_date,
|
1226
|
+
onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
|
1227
|
+
last_menstrual_period_date: last_menstrual_period_date,
|
1228
|
+
delay_reason_code: delay_reason_code,
|
1229
|
+
patient: patient,
|
1230
|
+
patient_authorized_release: patient_authorized_release,
|
1231
|
+
schema_instances: schema_instances,
|
1232
|
+
vitals: vitals
|
1233
|
+
}.compact
|
1234
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
1235
|
+
request_options: request_options)}/api/encounters/v4/#{encounter_id}"
|
1236
|
+
end
|
1237
|
+
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
1238
|
+
end
|
1239
|
+
end
|
1240
|
+
|
1241
|
+
class AsyncV4Client
|
1242
|
+
# @return [CandidApiClient::AsyncRequestClient]
|
1243
|
+
attr_reader :request_client
|
1244
|
+
|
1245
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
1246
|
+
# @return [CandidApiClient::Encounters::V4::AsyncV4Client]
|
1247
|
+
def initialize(request_client:)
|
1248
|
+
@request_client = request_client
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
# @param limit [Integer] Maximum number of entities per page, defaults to 100.
|
1252
|
+
# @param claim_status [CandidApiClient::Claims::Types::ClaimStatus] Indicates the current status of an insurance claim within the billing process.
|
1253
|
+
# @param sort [CandidApiClient::Encounters::V4::Types::EncounterSortOptions] Defaults to created_at:desc.
|
1254
|
+
# @param page_token [String]
|
1255
|
+
# @param date_of_service_min [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1256
|
+
# @param date_of_service_max [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1257
|
+
# @param primary_payer_names [String] Comma delimited string.
|
1258
|
+
# @param search_term [String] Filter by any of the following fields: encounter_id, claim_id, patient
|
1259
|
+
# external_id,
|
1260
|
+
# patient date of birth, patient first name, patient last name,
|
1261
|
+
# or encounter external id.
|
1262
|
+
# @param external_id [String] Filter to an exact match on encounter external_id, if one exists.
|
1263
|
+
# @param diagnoses_updated_since [DateTime] ISO 8601 timestamp; ideally in UTC (although not required):
|
1264
|
+
# 2019-08-24T14:15:22Z.
|
1265
|
+
# @param tag_ids [String] Filter by name of tags on encounters.
|
1266
|
+
# @param work_queue_id [String]
|
1267
|
+
# @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
|
1268
|
+
# Examples for when this should be set to NOT_BILLABLE include if the Encounter
|
1269
|
+
# has not occurred yet or if there is no intention of ever billing the
|
1270
|
+
# responsible_party.
|
1271
|
+
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
|
1272
|
+
# SELF_PAY if you intend to bill self pay/cash pay.
|
1273
|
+
# @param owner_of_next_action [CandidApiClient::Encounters::V4::Types::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as
|
1274
|
+
# defined by ownership of open Tasks.
|
1275
|
+
# @param patient_external_id [String] The patient ID from the external EMR platform for the patient
|
1276
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
1277
|
+
# @return [CandidApiClient::Encounters::V4::Types::EncounterPage]
|
1278
|
+
# @example
|
1279
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1280
|
+
# api.encounters.v_4.get_all(
|
1281
|
+
# limit: 100,
|
1282
|
+
# claim_status: BILLER_RECEIVED,
|
1283
|
+
# sort: CREATED_AT_ASC,
|
1284
|
+
# page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
|
1285
|
+
# date_of_service_min: DateTime.parse(2019-08-24),
|
1286
|
+
# date_of_service_max: DateTime.parse(2019-08-25),
|
1287
|
+
# primary_payer_names: "Medicare,Medicaid",
|
1288
|
+
# search_term: "doe",
|
1289
|
+
# external_id: "123456",
|
1290
|
+
# diagnoses_updated_since: DateTime.parse(2019-08-24T14:15:22.000Z)
|
1291
|
+
# )
|
1292
|
+
def get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil,
|
1293
|
+
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)
|
1294
|
+
Async do
|
1295
|
+
response = @request_client.conn.get do |req|
|
1296
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1297
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1298
|
+
req.headers = {
|
1299
|
+
**(req.headers || {}),
|
1300
|
+
**@request_client.get_headers,
|
1301
|
+
**(request_options&.additional_headers || {})
|
1302
|
+
}.compact
|
1303
|
+
req.params = {
|
1304
|
+
**(request_options&.additional_query_parameters || {}),
|
1305
|
+
"limit": limit,
|
1306
|
+
"claim_status": claim_status,
|
1307
|
+
"sort": sort,
|
1308
|
+
"page_token": page_token,
|
1309
|
+
"date_of_service_min": date_of_service_min,
|
1310
|
+
"date_of_service_max": date_of_service_max,
|
1311
|
+
"primary_payer_names": primary_payer_names,
|
1312
|
+
"search_term": search_term,
|
1313
|
+
"external_id": external_id,
|
1314
|
+
"diagnoses_updated_since": diagnoses_updated_since,
|
1315
|
+
"tag_ids": tag_ids,
|
1316
|
+
"work_queue_id": work_queue_id,
|
1317
|
+
"billable_status": billable_status,
|
1318
|
+
"responsible_party": responsible_party,
|
1319
|
+
"owner_of_next_action": owner_of_next_action,
|
1320
|
+
"patient_external_id": patient_external_id
|
1321
|
+
}.compact
|
1322
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
1323
|
+
request_options: request_options)}/api/encounters/v4"
|
1324
|
+
end
|
1325
|
+
CandidApiClient::Encounters::V4::Types::EncounterPage.from_json(json_object: response.body)
|
1326
|
+
end
|
1327
|
+
end
|
1328
|
+
|
1329
|
+
# @param encounter_id [String]
|
1330
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
1331
|
+
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
1332
|
+
# @example
|
1333
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1334
|
+
# api.encounters.v_4.get(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
1335
|
+
def get(encounter_id:, request_options: nil)
|
1336
|
+
Async do
|
1337
|
+
response = @request_client.conn.get do |req|
|
1338
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1339
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1340
|
+
req.headers = {
|
1341
|
+
**(req.headers || {}),
|
1342
|
+
**@request_client.get_headers,
|
1343
|
+
**(request_options&.additional_headers || {})
|
1344
|
+
}.compact
|
1345
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
1346
|
+
request_options: request_options)}/api/encounters/v4/#{encounter_id}"
|
1347
|
+
end
|
1348
|
+
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
1349
|
+
end
|
1350
|
+
end
|
1351
|
+
|
1352
|
+
# @param external_id [String] A client-specified unique ID to associate with this encounter;
|
1353
|
+
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
1354
|
+
# This field should not contain PHI.
|
1355
|
+
# @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
1356
|
+
# This date must be the local date in the timezone where the service occurred.
|
1357
|
+
# Box 24a on the CMS-1500 claim form.
|
1358
|
+
# If service occurred over a range of dates, this should be the start date.
|
1359
|
+
# date_of_service must be defined on either the encounter or the service lines but
|
1360
|
+
# not both.
|
1361
|
+
# If there are greater than zero service lines, it is recommended to specify
|
1362
|
+
# date_of_service on the service_line instead of on the encounter to prepare for
|
1363
|
+
# future API versions.
|
1364
|
+
# @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1365
|
+
# This date must be the local date in the timezone where the service occurred.
|
1366
|
+
# If omitted, the Encounter is assumed to be for a single day.
|
1367
|
+
# Must not be temporally before the date_of_service field.
|
1368
|
+
# If there are greater than zero service lines, it is recommended to specify
|
1369
|
+
# end_date_of_service on the service_line instead of on the encounter to prepare
|
1370
|
+
# for future API versions.
|
1371
|
+
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
1372
|
+
# for billing purpose.
|
1373
|
+
# Box 12 on the CMS-1500 claim form.
|
1374
|
+
# @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you,
|
1375
|
+
# not them. If false, patient may receive reimbursement.
|
1376
|
+
# Box 13 on the CMS-1500 claim form.
|
1377
|
+
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
|
1378
|
+
# to be made to you, not them.
|
1379
|
+
# Box 27 on the CMS-1500 claim form.
|
1380
|
+
# @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
|
1381
|
+
# * :name (String)
|
1382
|
+
# * :rx_cui (String)
|
1383
|
+
# * :dosage (String)
|
1384
|
+
# * :dosage_form (String)
|
1385
|
+
# * :frequency (String)
|
1386
|
+
# * :as_needed (Boolean)
|
1387
|
+
# @param vitals [Hash] Request of type CandidApiClient::Encounters::V4::Types::Vitals, as a Hash
|
1388
|
+
# * :height_in (Integer)
|
1389
|
+
# * :weight_lbs (Integer)
|
1390
|
+
# * :blood_pressure_systolic_mmhg (Integer)
|
1391
|
+
# * :blood_pressure_diastolic_mmhg (Integer)
|
1392
|
+
# * :body_temperature_f (Float)
|
1393
|
+
# * :hemoglobin_gdl (Float)
|
1394
|
+
# * :hematocrit_pct (Float)
|
1395
|
+
# @param interventions [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Intervention>, as a Hash
|
1396
|
+
# * :name (String)
|
1397
|
+
# * :category (CandidApiClient::Encounters::V4::Types::InterventionCategory)
|
1398
|
+
# * :description (String)
|
1399
|
+
# * :medication (Hash)
|
1400
|
+
# * :name (String)
|
1401
|
+
# * :rx_cui (String)
|
1402
|
+
# * :dosage (String)
|
1403
|
+
# * :dosage_form (String)
|
1404
|
+
# * :frequency (String)
|
1405
|
+
# * :as_needed (Boolean)
|
1406
|
+
# * :labs (Array<CandidApiClient::Encounters::V4::Types::Lab>)
|
1407
|
+
# @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type CandidApiClient::Commons::Types::StreetAddressLongZip, as a Hash
|
1408
|
+
# * :zip_plus_four_code (String)
|
1409
|
+
# * :address_1 (String)
|
1410
|
+
# * :address_2 (String)
|
1411
|
+
# * :city (String)
|
1412
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1413
|
+
# * :zip_code (String)
|
1414
|
+
# @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
|
1415
|
+
# Asynchronous encounters occur when providers and patients communicate online
|
1416
|
+
# using
|
1417
|
+
# forms, instant messaging, or other pre-recorded digital mediums.
|
1418
|
+
# Synchronous encounters occur in live, real-time settings where the patient
|
1419
|
+
# interacts
|
1420
|
+
# directly with the provider, such as over video or a phone call.
|
1421
|
+
# @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
|
1422
|
+
# Examples for when this should be set to NOT_BILLABLE include
|
1423
|
+
# if the Encounter has not occurred yet or if there is no intention of ever
|
1424
|
+
# billing the responsible_party.
|
1425
|
+
# @param additional_information [String] Defines additional information on the claim needed by the payer.
|
1426
|
+
# Box 19 on the CMS-1500 claim form.
|
1427
|
+
# @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
|
1428
|
+
# Required when mandated by government law or regulation to obtain authorization
|
1429
|
+
# for specific service(s) but, for the
|
1430
|
+
# reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
|
1431
|
+
# the service was performed without
|
1432
|
+
# obtaining the authorization.
|
1433
|
+
# @param admission_date [Date] 837p Loop2300 DTP\*435, CMS-1500 Box 18
|
1434
|
+
# Required on all ambulance claims when the patient was known to be admitted to
|
1435
|
+
# the hospital.
|
1436
|
+
# OR
|
1437
|
+
# Required on all claims involving inpatient medical visits.
|
1438
|
+
# @param discharge_date [Date] 837p Loop2300 DTP\*096, CMS-1500 Box 18
|
1439
|
+
# Required for inpatient claims when the patient was discharged from the facility
|
1440
|
+
# and the discharge date is known.
|
1441
|
+
# @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP\*431, CMS-1500 Box 14
|
1442
|
+
# Required for the initial medical service or visit performed in response to a
|
1443
|
+
# medical emergency when the date is available and is different than the date of
|
1444
|
+
# service.
|
1445
|
+
# OR
|
1446
|
+
# This date is the onset of acute symptoms for the current illness or condition.
|
1447
|
+
# @param last_menstrual_period_date [Date] 837p Loop2300 DTP\*484, CMS-1500 Box 14
|
1448
|
+
# Required when, in the judgment of the provider, the services on this claim are
|
1449
|
+
# related to the patient's pregnancy.
|
1450
|
+
# @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
|
1451
|
+
# Code indicating the reason why a request was delayed
|
1452
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
1453
|
+
# @param _field_set [Object]
|
1454
|
+
# @param patient [Hash] Contains the identification information of the individual receiving medical
|
1455
|
+
# services.Request of type CandidApiClient::Individual::Types::PatientCreate, as a Hash
|
1456
|
+
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1457
|
+
# * :phone_consent (Boolean)
|
1458
|
+
# * :email (String)
|
1459
|
+
# * :non_insurance_payers (Array<String>)
|
1460
|
+
# * :email_consent (Boolean)
|
1461
|
+
# * :external_id (String)
|
1462
|
+
# * :date_of_birth (Date)
|
1463
|
+
# * :address (Hash)
|
1464
|
+
# * :zip_plus_four_code (String)
|
1465
|
+
# * :address_1 (String)
|
1466
|
+
# * :address_2 (String)
|
1467
|
+
# * :city (String)
|
1468
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1469
|
+
# * :zip_code (String)
|
1470
|
+
# * :first_name (String)
|
1471
|
+
# * :last_name (String)
|
1472
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1473
|
+
# @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
|
1474
|
+
# Billing provider may be, but is not necessarily, the same person/NPI as the
|
1475
|
+
# rendering provider. From a payer's perspective, this represents the person or
|
1476
|
+
# entity being reimbursed. When a contract exists with the target payer, the
|
1477
|
+
# billing provider should be the entity contracted with the payer. In some
|
1478
|
+
# circumstances, this will be an individual provider. In that case, submit that
|
1479
|
+
# provider's NPI and the tax ID (TIN) that the provider gave to the payer during
|
1480
|
+
# contracting. In other cases, the billing entity will be a medical group. If so,
|
1481
|
+
# submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim form.Request of type CandidApiClient::EncounterProviders::V2::Types::BillingProvider, as a Hash
|
1482
|
+
# * :address (Hash)
|
1483
|
+
# * :zip_plus_four_code (String)
|
1484
|
+
# * :address_1 (String)
|
1485
|
+
# * :address_2 (String)
|
1486
|
+
# * :city (String)
|
1487
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1488
|
+
# * :zip_code (String)
|
1489
|
+
# * :tax_id (String)
|
1490
|
+
# * :npi (String)
|
1491
|
+
# * :taxonomy_code (String)
|
1492
|
+
# * :first_name (String)
|
1493
|
+
# * :last_name (String)
|
1494
|
+
# * :organization_name (String)
|
1495
|
+
# @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
|
1496
|
+
# etc. -- performing the service.
|
1497
|
+
# For telehealth services, the rendering provider performs the visit, asynchronous
|
1498
|
+
# communication, or other service. The rendering provider address should generally
|
1499
|
+
# be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProvider, as a Hash
|
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
|
+
# * :npi (String)
|
1508
|
+
# * :taxonomy_code (String)
|
1509
|
+
# * :first_name (String)
|
1510
|
+
# * :last_name (String)
|
1511
|
+
# * :organization_name (String)
|
1512
|
+
# @param referring_provider [Hash] The final provider who referred the services that were rendered.
|
1513
|
+
# All physicians who order services or refer Medicare beneficiaries must
|
1514
|
+
# report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProvider, as a Hash
|
1515
|
+
# * :npi (String)
|
1516
|
+
# * :taxonomy_code (String)
|
1517
|
+
# * :address (Hash)
|
1518
|
+
# * :zip_plus_four_code (String)
|
1519
|
+
# * :address_1 (String)
|
1520
|
+
# * :address_2 (String)
|
1521
|
+
# * :city (String)
|
1522
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1523
|
+
# * :zip_code (String)
|
1524
|
+
# * :first_name (String)
|
1525
|
+
# * :last_name (String)
|
1526
|
+
# * :organization_name (String)
|
1527
|
+
# @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
|
1528
|
+
# this loop to
|
1529
|
+
# indicate the initial referral from the primary care provider or whatever
|
1530
|
+
# provider wrote the initial referral for this patient's episode of care being
|
1531
|
+
# billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider, as a Hash
|
1532
|
+
# * :npi (String)
|
1533
|
+
# * :taxonomy_code (String)
|
1534
|
+
# * :address (Hash)
|
1535
|
+
# * :zip_plus_four_code (String)
|
1536
|
+
# * :address_1 (String)
|
1537
|
+
# * :address_2 (String)
|
1538
|
+
# * :city (String)
|
1539
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1540
|
+
# * :zip_code (String)
|
1541
|
+
# * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
|
1542
|
+
# * :first_name (String)
|
1543
|
+
# * :last_name (String)
|
1544
|
+
# * :organization_name (String)
|
1545
|
+
# @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
|
1546
|
+
# required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider, as a Hash
|
1547
|
+
# * :npi (String)
|
1548
|
+
# * :taxonomy_code (String)
|
1549
|
+
# * :address (Hash)
|
1550
|
+
# * :zip_plus_four_code (String)
|
1551
|
+
# * :address_1 (String)
|
1552
|
+
# * :address_2 (String)
|
1553
|
+
# * :city (String)
|
1554
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1555
|
+
# * :zip_code (String)
|
1556
|
+
# * :first_name (String)
|
1557
|
+
# * :last_name (String)
|
1558
|
+
# * :organization_name (String)
|
1559
|
+
# @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
|
1560
|
+
# rendered, such as a provider office or hospital. For telehealth, service
|
1561
|
+
# facility can represent the provider's location when the service was delivered
|
1562
|
+
# (e.g., home), or the location where an in-person visit would have taken place,
|
1563
|
+
# whichever is easier to identify. If the provider is in-network, service facility
|
1564
|
+
# may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
|
1565
|
+
# for an in-network claim to be successfully adjudicated, the service facility
|
1566
|
+
# address listed on claims must match what was provided to the payer during the
|
1567
|
+
# credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase, as a Hash
|
1568
|
+
# * :organization_name (String)
|
1569
|
+
# * :npi (String)
|
1570
|
+
# * :address (Hash)
|
1571
|
+
# * :zip_plus_four_code (String)
|
1572
|
+
# * :address_1 (String)
|
1573
|
+
# * :address_2 (String)
|
1574
|
+
# * :city (String)
|
1575
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1576
|
+
# * :zip_code (String)
|
1577
|
+
# @param subscriber_primary [Hash] Subscriber_primary is required when responsible_party is INSURANCE_PAY (i.e.
|
1578
|
+
# when the claim should be billed to insurance).
|
1579
|
+
# These are not required fields when responsible_party is SELF_PAY (i.e. when the
|
1580
|
+
# claim should be billed to the patient).
|
1581
|
+
# However, if you collect this for patients, even self-pay, we recommend including
|
1582
|
+
# it when sending encounters to Candid.
|
1583
|
+
# Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party
|
1584
|
+
# to define self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
1585
|
+
# * :insurance_card (Hash)
|
1586
|
+
# * :member_id (String)
|
1587
|
+
# * :payer_name (String)
|
1588
|
+
# * :payer_id (String)
|
1589
|
+
# * :rx_bin (String)
|
1590
|
+
# * :rx_pcn (String)
|
1591
|
+
# * :image_url_front (String)
|
1592
|
+
# * :image_url_back (String)
|
1593
|
+
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1594
|
+
# * :group_number (String)
|
1595
|
+
# * :plan_name (String)
|
1596
|
+
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1597
|
+
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1598
|
+
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1599
|
+
# * :date_of_birth (Date)
|
1600
|
+
# * :address (Hash)
|
1601
|
+
# * :zip_plus_four_code (String)
|
1602
|
+
# * :address_1 (String)
|
1603
|
+
# * :address_2 (String)
|
1604
|
+
# * :city (String)
|
1605
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1606
|
+
# * :zip_code (String)
|
1607
|
+
# * :first_name (String)
|
1608
|
+
# * :last_name (String)
|
1609
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1610
|
+
# @param subscriber_secondary [Hash] Please always include this when you have it, even for self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
1611
|
+
# * :insurance_card (Hash)
|
1612
|
+
# * :member_id (String)
|
1613
|
+
# * :payer_name (String)
|
1614
|
+
# * :payer_id (String)
|
1615
|
+
# * :rx_bin (String)
|
1616
|
+
# * :rx_pcn (String)
|
1617
|
+
# * :image_url_front (String)
|
1618
|
+
# * :image_url_back (String)
|
1619
|
+
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1620
|
+
# * :group_number (String)
|
1621
|
+
# * :plan_name (String)
|
1622
|
+
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1623
|
+
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1624
|
+
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1625
|
+
# * :date_of_birth (Date)
|
1626
|
+
# * :address (Hash)
|
1627
|
+
# * :zip_plus_four_code (String)
|
1628
|
+
# * :address_1 (String)
|
1629
|
+
# * :address_2 (String)
|
1630
|
+
# * :city (String)
|
1631
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1632
|
+
# * :zip_code (String)
|
1633
|
+
# * :first_name (String)
|
1634
|
+
# * :last_name (String)
|
1635
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1636
|
+
# @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
|
+
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
|
1640
|
+
# @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
1641
|
+
# diagnoses
|
1642
|
+
# may be submitted at this time, and coders will later prioritize the 12 that will
|
1643
|
+
# be
|
1644
|
+
# submitted to the payor.Request of type Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>, as a Hash
|
1645
|
+
# * :name (String)
|
1646
|
+
# * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
|
1647
|
+
# * :code (String)
|
1648
|
+
# @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
|
1649
|
+
# patient encounters.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
|
1650
|
+
# * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
|
1651
|
+
# * :notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNote>)
|
1652
|
+
# @param billing_notes [Array<Hash>] Spot to store misc, human-readable, notes about this encounter to be used
|
1653
|
+
# in the billing process.Request of type Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>, as a Hash
|
1654
|
+
# * :text (String)
|
1655
|
+
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. Line-level place of service is not currently
|
1656
|
+
# supported. 02 for telemedicine, 11 for in-person. Full list
|
1657
|
+
# //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
1658
|
+
# @param patient_histories [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>, as a Hash
|
1659
|
+
# * :category (CandidApiClient::Encounters::V4::Types::PatientHistoryCategoryEnum)
|
1660
|
+
# * :questions (Array<CandidApiClient::Encounters::V4::Types::IntakeQuestion>)
|
1661
|
+
# @param service_lines [Array<Hash>] Each service line must be linked to a diagnosis. Concretely,
|
1662
|
+
# `service_line.diagnosis_pointers`must contain at least one entry which should be
|
1663
|
+
# in bounds of the diagnoses list field.Request of type Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>, as a Hash
|
1664
|
+
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
1665
|
+
# * :procedure_code (String)
|
1666
|
+
# * :quantity (String)
|
1667
|
+
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
1668
|
+
# * :charge_amount_cents (Integer)
|
1669
|
+
# * :diagnosis_pointers (Array<Integer>)
|
1670
|
+
# * :drug_identification (Hash)
|
1671
|
+
# * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
|
1672
|
+
# * :national_drug_code (String)
|
1673
|
+
# * :national_drug_unit_count (String)
|
1674
|
+
# * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
|
1675
|
+
# * :link_sequence_number (String)
|
1676
|
+
# * :pharmacy_prescription_number (String)
|
1677
|
+
# * :conversion_formula (String)
|
1678
|
+
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
1679
|
+
# * :description (String)
|
1680
|
+
# * :date_of_service (Date)
|
1681
|
+
# * :end_date_of_service (Date)
|
1682
|
+
# * :ordering_provider (Hash)
|
1683
|
+
# * :npi (String)
|
1684
|
+
# * :taxonomy_code (String)
|
1685
|
+
# * :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
|
+
# * :first_name (String)
|
1693
|
+
# * :last_name (String)
|
1694
|
+
# * :organization_name (String)
|
1695
|
+
# @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorCreate, as a Hash
|
1696
|
+
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1697
|
+
# * :phone_consent (Boolean)
|
1698
|
+
# * :email (String)
|
1699
|
+
# * :email_consent (Boolean)
|
1700
|
+
# * :first_name (String)
|
1701
|
+
# * :last_name (String)
|
1702
|
+
# * :external_id (String)
|
1703
|
+
# * :date_of_birth (Date)
|
1704
|
+
# * :address (Hash)
|
1705
|
+
# * :zip_plus_four_code (String)
|
1706
|
+
# * :address_1 (String)
|
1707
|
+
# * :address_2 (String)
|
1708
|
+
# * :city (String)
|
1709
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1710
|
+
# * :zip_code (String)
|
1711
|
+
# @param external_claim_submission [Hash] ***This field is in beta.***
|
1712
|
+
# To be included for claims that have been submitted outside of Candid.
|
1713
|
+
# Candid supports posting remits and payments to these claims and working them
|
1714
|
+
# in-platform (e.g. editing, resubmitting).Request of type CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate, as a Hash
|
1715
|
+
# * :claim_created_at (DateTime)
|
1716
|
+
# * :patient_control_number (String)
|
1717
|
+
# * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
|
1718
|
+
# @param tag_ids [Array<String>] Names of tags that should be on the encounter.
|
1719
|
+
# @param schema_instances [Array<Hash>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
|
1720
|
+
# Multiple schema
|
1721
|
+
# instances cannot be created for the same schema on an encounter.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
|
1722
|
+
# * :schema_id (String)
|
1723
|
+
# * :content (Hash{String => Object})
|
1724
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
1725
|
+
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
1726
|
+
# @example
|
1727
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1728
|
+
# api.encounters.v_4.create(
|
1729
|
+
# 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
|
+
# 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" },
|
1732
|
+
# 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
|
+
# 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
|
+
# 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" },
|
1735
|
+
# 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" } },
|
1736
|
+
# 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
|
+
# 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
|
+
# prior_authorization_number: "string",
|
1739
|
+
# appointment_type: "string",
|
1740
|
+
# responsible_party: INSURANCE_PAY,
|
1741
|
+
# diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
|
1742
|
+
# clinical_notes: [{ category: CLINICAL, notes: [{ text: "string", author_name: "string", author_npi: "string", timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }] }],
|
1743
|
+
# billing_notes: [{ text: "string" }],
|
1744
|
+
# place_of_service_code: PHARMACY,
|
1745
|
+
# patient_histories: [{ category: PRESENT_ILLNESS, questions: [{ id: "6E7FBCE4-A8EA-46D0-A8D8-FF83CA3BB176", text: "Do you have any allergies?", responses: [{ response: "No allergies", follow_ups: [{ id: "4F3D57F9-AC94-49D6-87E4-E804B709917A", text: "Do you have any allergies?", response: "No allergies" }] }] }] }],
|
1746
|
+
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" } }],
|
1747
|
+
# guarantor: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true, 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" } },
|
1748
|
+
# external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] },
|
1749
|
+
# tag_ids: ["string"],
|
1750
|
+
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
1751
|
+
# )
|
1752
|
+
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)
|
953
1754
|
Async do
|
954
|
-
response = @request_client.conn.
|
1755
|
+
response = @request_client.conn.post do |req|
|
955
1756
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
956
1757
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
957
1758
|
req.headers = {
|
@@ -959,17 +1760,99 @@ module CandidApiClient
|
|
959
1760
|
**@request_client.get_headers,
|
960
1761
|
**(request_options&.additional_headers || {})
|
961
1762
|
}.compact
|
1763
|
+
req.body = {
|
1764
|
+
**(request_options&.additional_body_parameters || {}),
|
1765
|
+
external_id: external_id,
|
1766
|
+
date_of_service: date_of_service,
|
1767
|
+
end_date_of_service: end_date_of_service,
|
1768
|
+
patient_authorized_release: patient_authorized_release,
|
1769
|
+
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
1770
|
+
provider_accepts_assignment: provider_accepts_assignment,
|
1771
|
+
existing_medications: existing_medications,
|
1772
|
+
vitals: vitals,
|
1773
|
+
interventions: interventions,
|
1774
|
+
pay_to_address: pay_to_address,
|
1775
|
+
synchronicity: synchronicity,
|
1776
|
+
billable_status: billable_status,
|
1777
|
+
additional_information: additional_information,
|
1778
|
+
service_authorization_exception_code: service_authorization_exception_code,
|
1779
|
+
admission_date: admission_date,
|
1780
|
+
discharge_date: discharge_date,
|
1781
|
+
onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
|
1782
|
+
last_menstrual_period_date: last_menstrual_period_date,
|
1783
|
+
delay_reason_code: delay_reason_code,
|
1784
|
+
additional_properties: additional_properties,
|
1785
|
+
_field_set: _field_set,
|
1786
|
+
patient: patient,
|
1787
|
+
billing_provider: billing_provider,
|
1788
|
+
rendering_provider: rendering_provider,
|
1789
|
+
referring_provider: referring_provider,
|
1790
|
+
initial_referring_provider: initial_referring_provider,
|
1791
|
+
supervising_provider: supervising_provider,
|
1792
|
+
service_facility: service_facility,
|
1793
|
+
subscriber_primary: subscriber_primary,
|
1794
|
+
subscriber_secondary: subscriber_secondary,
|
1795
|
+
prior_authorization_number: prior_authorization_number,
|
1796
|
+
appointment_type: appointment_type,
|
1797
|
+
responsible_party: responsible_party,
|
1798
|
+
diagnoses: diagnoses,
|
1799
|
+
clinical_notes: clinical_notes,
|
1800
|
+
billing_notes: billing_notes,
|
1801
|
+
place_of_service_code: place_of_service_code,
|
1802
|
+
patient_histories: patient_histories,
|
1803
|
+
service_lines: service_lines,
|
1804
|
+
guarantor: guarantor,
|
1805
|
+
external_claim_submission: external_claim_submission,
|
1806
|
+
tag_ids: tag_ids,
|
1807
|
+
schema_instances: schema_instances
|
1808
|
+
}.compact
|
962
1809
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
963
|
-
request_options: request_options)}/api/encounters/v4
|
1810
|
+
request_options: request_options)}/api/encounters/v4"
|
964
1811
|
end
|
965
1812
|
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
966
1813
|
end
|
967
1814
|
end
|
968
1815
|
|
1816
|
+
# Create an encounter from a pre-encounter patient and appointment. This endpoint
|
1817
|
+
# is intended to be used by consumers who are managing
|
1818
|
+
# patients and appointments in the pre-encounter service and is currently under
|
1819
|
+
# development. Consumers who are not taking advantage
|
1820
|
+
# of the pre-encounter service should use the standard create endpoint.
|
1821
|
+
# The endpoint will create an encounter from the provided fields, pulling
|
1822
|
+
# information from the provided patient and appointment objects
|
1823
|
+
# where applicable. In particular, the following fields are populated from the
|
1824
|
+
# patient and appointment objects:
|
1825
|
+
# - Patient
|
1826
|
+
# - Referring Provider
|
1827
|
+
# - Subscriber Primary
|
1828
|
+
# - Subscriber Secondary
|
1829
|
+
# - Prior Authorization Number
|
1830
|
+
# - Appointment Type
|
1831
|
+
# - Responsible Party
|
1832
|
+
# - Guarantor
|
1833
|
+
# Utilizing this endpoint opts you into automatic updating of the encounter when
|
1834
|
+
# the patient or appointment is updated, assuming the
|
1835
|
+
# encounter has not already been submitted or adjudicated.
|
1836
|
+
#
|
969
1837
|
# @param external_id [String] A client-specified unique ID to associate with this encounter;
|
970
1838
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
971
1839
|
# This field should not contain PHI.
|
972
|
-
# @param
|
1840
|
+
# @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
1841
|
+
# This date must be the local date in the timezone where the service occurred.
|
1842
|
+
# Box 24a on the CMS-1500 claim form.
|
1843
|
+
# If service occurred over a range of dates, this should be the start date.
|
1844
|
+
# date_of_service must be defined on either the encounter or the service lines but
|
1845
|
+
# not both.
|
1846
|
+
# If there are greater than zero service lines, it is recommended to specify
|
1847
|
+
# date_of_service on the service_line instead of on the encounter to prepare for
|
1848
|
+
# future API versions.
|
1849
|
+
# @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1850
|
+
# This date must be the local date in the timezone where the service occurred.
|
1851
|
+
# If omitted, the Encounter is assumed to be for a single day.
|
1852
|
+
# Must not be temporally before the date_of_service field.
|
1853
|
+
# If there are greater than zero service lines, it is recommended to specify
|
1854
|
+
# end_date_of_service on the service_line instead of on the encounter to prepare
|
1855
|
+
# for future API versions.
|
973
1856
|
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
974
1857
|
# for billing purpose.
|
975
1858
|
# Box 12 on the CMS-1500 claim form.
|
@@ -979,8 +1862,6 @@ module CandidApiClient
|
|
979
1862
|
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
|
980
1863
|
# to be made to you, not them.
|
981
1864
|
# Box 27 on the CMS-1500 claim form.
|
982
|
-
# @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
983
|
-
# Headaches").
|
984
1865
|
# @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
|
985
1866
|
# * :name (String)
|
986
1867
|
# * :rx_cui (String)
|
@@ -1026,7 +1907,6 @@ module CandidApiClient
|
|
1026
1907
|
# Examples for when this should be set to NOT_BILLABLE include
|
1027
1908
|
# if the Encounter has not occurred yet or if there is no intention of ever
|
1028
1909
|
# billing the responsible_party.
|
1029
|
-
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
|
1030
1910
|
# @param additional_information [String] Defines additional information on the claim needed by the payer.
|
1031
1911
|
# Box 19 on the CMS-1500 claim form.
|
1032
1912
|
# @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
|
@@ -1056,41 +1936,8 @@ module CandidApiClient
|
|
1056
1936
|
# Code indicating the reason why a request was delayed
|
1057
1937
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
1058
1938
|
# @param _field_set [Object]
|
1059
|
-
# @param
|
1060
|
-
#
|
1061
|
-
# Box 24a on the CMS-1500 claim form.
|
1062
|
-
# If service occurred over a range of dates, this should be the start date.
|
1063
|
-
# date_of_service must be defined on either the encounter or the service lines but
|
1064
|
-
# not both.
|
1065
|
-
# If there are greater than zero service lines, it is recommended to specify
|
1066
|
-
# date_of_service on the service_line instead of on the encounter to prepare for
|
1067
|
-
# future API versions.
|
1068
|
-
# @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1069
|
-
# This date must be the local date in the timezone where the service occurred.
|
1070
|
-
# If omitted, the Encounter is assumed to be for a single day.
|
1071
|
-
# Must not be temporally before the date_of_service field.
|
1072
|
-
# If there are greater than zero service lines, it is recommended to specify
|
1073
|
-
# end_date_of_service on the service_line instead of on the encounter to prepare
|
1074
|
-
# for future API versions.
|
1075
|
-
# @param patient [Hash] Contains the identification information of the individual receiving medical
|
1076
|
-
# services.Request of type CandidApiClient::Individual::Types::PatientCreate, as a Hash
|
1077
|
-
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1078
|
-
# * :phone_consent (Boolean)
|
1079
|
-
# * :email (String)
|
1080
|
-
# * :non_insurance_payers (Array<String>)
|
1081
|
-
# * :email_consent (Boolean)
|
1082
|
-
# * :external_id (String)
|
1083
|
-
# * :date_of_birth (Date)
|
1084
|
-
# * :address (Hash)
|
1085
|
-
# * :zip_plus_four_code (String)
|
1086
|
-
# * :address_1 (String)
|
1087
|
-
# * :address_2 (String)
|
1088
|
-
# * :city (String)
|
1089
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1090
|
-
# * :zip_code (String)
|
1091
|
-
# * :first_name (String)
|
1092
|
-
# * :last_name (String)
|
1093
|
-
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1939
|
+
# @param pre_encounter_patient_id [String]
|
1940
|
+
# @param pre_encounter_appointment_id [String]
|
1094
1941
|
# @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
|
1095
1942
|
# Billing provider may be, but is not necessarily, the same person/NPI as the
|
1096
1943
|
# rendering provider. From a payer's perspective, this represents the person or
|
@@ -1130,21 +1977,6 @@ module CandidApiClient
|
|
1130
1977
|
# * :first_name (String)
|
1131
1978
|
# * :last_name (String)
|
1132
1979
|
# * :organization_name (String)
|
1133
|
-
# @param referring_provider [Hash] The final provider who referred the services that were rendered.
|
1134
|
-
# All physicians who order services or refer Medicare beneficiaries must
|
1135
|
-
# report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProvider, as a Hash
|
1136
|
-
# * :npi (String)
|
1137
|
-
# * :taxonomy_code (String)
|
1138
|
-
# * :address (Hash)
|
1139
|
-
# * :zip_plus_four_code (String)
|
1140
|
-
# * :address_1 (String)
|
1141
|
-
# * :address_2 (String)
|
1142
|
-
# * :city (String)
|
1143
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1144
|
-
# * :zip_code (String)
|
1145
|
-
# * :first_name (String)
|
1146
|
-
# * :last_name (String)
|
1147
|
-
# * :organization_name (String)
|
1148
1980
|
# @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
|
1149
1981
|
# this loop to
|
1150
1982
|
# indicate the initial referral from the primary care provider or whatever
|
@@ -1195,65 +2027,6 @@ module CandidApiClient
|
|
1195
2027
|
# * :city (String)
|
1196
2028
|
# * :state (CandidApiClient::Commons::Types::State)
|
1197
2029
|
# * :zip_code (String)
|
1198
|
-
# @param subscriber_primary [Hash] Subscriber_primary is required when responsible_party is INSURANCE_PAY (i.e.
|
1199
|
-
# when the claim should be billed to insurance).
|
1200
|
-
# These are not required fields when responsible_party is SELF_PAY (i.e. when the
|
1201
|
-
# claim should be billed to the patient).
|
1202
|
-
# However, if you collect this for patients, even self-pay, we recommend including
|
1203
|
-
# it when sending encounters to Candid.
|
1204
|
-
# Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party
|
1205
|
-
# to define self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
1206
|
-
# * :insurance_card (Hash)
|
1207
|
-
# * :member_id (String)
|
1208
|
-
# * :payer_name (String)
|
1209
|
-
# * :payer_id (String)
|
1210
|
-
# * :rx_bin (String)
|
1211
|
-
# * :rx_pcn (String)
|
1212
|
-
# * :image_url_front (String)
|
1213
|
-
# * :image_url_back (String)
|
1214
|
-
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1215
|
-
# * :group_number (String)
|
1216
|
-
# * :plan_name (String)
|
1217
|
-
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1218
|
-
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1219
|
-
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1220
|
-
# * :date_of_birth (Date)
|
1221
|
-
# * :address (Hash)
|
1222
|
-
# * :zip_plus_four_code (String)
|
1223
|
-
# * :address_1 (String)
|
1224
|
-
# * :address_2 (String)
|
1225
|
-
# * :city (String)
|
1226
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1227
|
-
# * :zip_code (String)
|
1228
|
-
# * :first_name (String)
|
1229
|
-
# * :last_name (String)
|
1230
|
-
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1231
|
-
# @param subscriber_secondary [Hash] Please always include this when you have it, even for self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
1232
|
-
# * :insurance_card (Hash)
|
1233
|
-
# * :member_id (String)
|
1234
|
-
# * :payer_name (String)
|
1235
|
-
# * :payer_id (String)
|
1236
|
-
# * :rx_bin (String)
|
1237
|
-
# * :rx_pcn (String)
|
1238
|
-
# * :image_url_front (String)
|
1239
|
-
# * :image_url_back (String)
|
1240
|
-
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1241
|
-
# * :group_number (String)
|
1242
|
-
# * :plan_name (String)
|
1243
|
-
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1244
|
-
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1245
|
-
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1246
|
-
# * :date_of_birth (Date)
|
1247
|
-
# * :address (Hash)
|
1248
|
-
# * :zip_plus_four_code (String)
|
1249
|
-
# * :address_1 (String)
|
1250
|
-
# * :address_2 (String)
|
1251
|
-
# * :city (String)
|
1252
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1253
|
-
# * :zip_code (String)
|
1254
|
-
# * :first_name (String)
|
1255
|
-
# * :last_name (String)
|
1256
|
-
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1257
2030
|
# @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
1258
2031
|
# diagnoses
|
1259
2032
|
# may be submitted at this time, and coders will later prioritize the 12 that will
|
@@ -1309,22 +2082,6 @@ module CandidApiClient
|
|
1309
2082
|
# * :first_name (String)
|
1310
2083
|
# * :last_name (String)
|
1311
2084
|
# * :organization_name (String)
|
1312
|
-
# @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorCreate, as a Hash
|
1313
|
-
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1314
|
-
# * :phone_consent (Boolean)
|
1315
|
-
# * :email (String)
|
1316
|
-
# * :email_consent (Boolean)
|
1317
|
-
# * :first_name (String)
|
1318
|
-
# * :last_name (String)
|
1319
|
-
# * :external_id (String)
|
1320
|
-
# * :date_of_birth (Date)
|
1321
|
-
# * :address (Hash)
|
1322
|
-
# * :zip_plus_four_code (String)
|
1323
|
-
# * :address_1 (String)
|
1324
|
-
# * :address_2 (String)
|
1325
|
-
# * :city (String)
|
1326
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1327
|
-
# * :zip_code (String)
|
1328
2085
|
# @param external_claim_submission [Hash] ***This field is in beta.***
|
1329
2086
|
# To be included for claims that have been submitted outside of Candid.
|
1330
2087
|
# Candid supports posting remits and payments to these claims and working them
|
@@ -1342,31 +2099,26 @@ module CandidApiClient
|
|
1342
2099
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
1343
2100
|
# @example
|
1344
2101
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1345
|
-
# api.encounters.v_4.
|
1346
|
-
#
|
1347
|
-
#
|
1348
|
-
# 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 },
|
2102
|
+
# api.encounters.v_4.create_from_pre_encounter_patient(
|
2103
|
+
# pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
2104
|
+
# pre_encounter_appointment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
1349
2105
|
# 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" },
|
1350
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" },
|
1351
|
-
# 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" },
|
1352
2107
|
# 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" },
|
1353
2108
|
# 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" },
|
1354
2109
|
# 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" } },
|
1355
|
-
# 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 },
|
1356
|
-
# 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 },
|
1357
2110
|
# diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
|
1358
2111
|
# clinical_notes: [{ category: CLINICAL, notes: [{ text: "string", author_name: "string", author_npi: "string", timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }] }],
|
1359
2112
|
# billing_notes: [{ text: "string" }],
|
1360
2113
|
# place_of_service_code: PHARMACY,
|
1361
2114
|
# patient_histories: [{ category: PRESENT_ILLNESS, questions: [{ id: "6E7FBCE4-A8EA-46D0-A8D8-FF83CA3BB176", text: "Do you have any allergies?", responses: [{ response: "No allergies", follow_ups: [{ id: "4F3D57F9-AC94-49D6-87E4-E804B709917A", text: "Do you have any allergies?", response: "No allergies" }] }] }] }],
|
1362
2115
|
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" } }],
|
1363
|
-
# guarantor: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true, 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" } },
|
1364
2116
|
# external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] },
|
1365
2117
|
# tag_ids: ["string"],
|
1366
2118
|
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
1367
2119
|
# )
|
1368
|
-
def
|
1369
|
-
|
2120
|
+
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)
|
1370
2122
|
Async do
|
1371
2123
|
response = @request_client.conn.post do |req|
|
1372
2124
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -1379,18 +2131,17 @@ module CandidApiClient
|
|
1379
2131
|
req.body = {
|
1380
2132
|
**(request_options&.additional_body_parameters || {}),
|
1381
2133
|
external_id: external_id,
|
1382
|
-
|
2134
|
+
date_of_service: date_of_service,
|
2135
|
+
end_date_of_service: end_date_of_service,
|
1383
2136
|
patient_authorized_release: patient_authorized_release,
|
1384
2137
|
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
1385
2138
|
provider_accepts_assignment: provider_accepts_assignment,
|
1386
|
-
appointment_type: appointment_type,
|
1387
2139
|
existing_medications: existing_medications,
|
1388
2140
|
vitals: vitals,
|
1389
2141
|
interventions: interventions,
|
1390
2142
|
pay_to_address: pay_to_address,
|
1391
2143
|
synchronicity: synchronicity,
|
1392
2144
|
billable_status: billable_status,
|
1393
|
-
responsible_party: responsible_party,
|
1394
2145
|
additional_information: additional_information,
|
1395
2146
|
service_authorization_exception_code: service_authorization_exception_code,
|
1396
2147
|
admission_date: admission_date,
|
@@ -1400,30 +2151,25 @@ module CandidApiClient
|
|
1400
2151
|
delay_reason_code: delay_reason_code,
|
1401
2152
|
additional_properties: additional_properties,
|
1402
2153
|
_field_set: _field_set,
|
1403
|
-
|
1404
|
-
|
1405
|
-
patient: patient,
|
2154
|
+
pre_encounter_patient_id: pre_encounter_patient_id,
|
2155
|
+
pre_encounter_appointment_id: pre_encounter_appointment_id,
|
1406
2156
|
billing_provider: billing_provider,
|
1407
2157
|
rendering_provider: rendering_provider,
|
1408
|
-
referring_provider: referring_provider,
|
1409
2158
|
initial_referring_provider: initial_referring_provider,
|
1410
2159
|
supervising_provider: supervising_provider,
|
1411
2160
|
service_facility: service_facility,
|
1412
|
-
subscriber_primary: subscriber_primary,
|
1413
|
-
subscriber_secondary: subscriber_secondary,
|
1414
2161
|
diagnoses: diagnoses,
|
1415
2162
|
clinical_notes: clinical_notes,
|
1416
2163
|
billing_notes: billing_notes,
|
1417
2164
|
place_of_service_code: place_of_service_code,
|
1418
2165
|
patient_histories: patient_histories,
|
1419
2166
|
service_lines: service_lines,
|
1420
|
-
guarantor: guarantor,
|
1421
2167
|
external_claim_submission: external_claim_submission,
|
1422
2168
|
tag_ids: tag_ids,
|
1423
2169
|
schema_instances: schema_instances
|
1424
2170
|
}.compact
|
1425
2171
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
1426
|
-
request_options: request_options)}/api/encounters/v4"
|
2172
|
+
request_options: request_options)}/api/encounters/v4/create-from-pre-encounter"
|
1427
2173
|
end
|
1428
2174
|
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
1429
2175
|
end
|
@@ -1448,7 +2194,7 @@ module CandidApiClient
|
|
1448
2194
|
# be
|
1449
2195
|
# submitted to the payor.
|
1450
2196
|
# @param tag_ids [Array<String>] Names of tags that should be on the encounter. Note all tags on encounter will
|
1451
|
-
# be
|
2197
|
+
# be overridden with this list.
|
1452
2198
|
# @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
|
1453
2199
|
# patient encounters.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
|
1454
2200
|
# * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
|
@@ -1571,6 +2317,25 @@ module CandidApiClient
|
|
1571
2317
|
# related to the patient's pregnancy.
|
1572
2318
|
# @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
|
1573
2319
|
# Code indicating the reason why a request was delayed
|
2320
|
+
# @param patient [Hash] Contains the identification information of the individual receiving medical
|
2321
|
+
# services.Request of type CandidApiClient::Individual::Types::PatientUpdate, as a Hash
|
2322
|
+
# * :first_name (String)
|
2323
|
+
# * :last_name (String)
|
2324
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
2325
|
+
# * :external_id (String)
|
2326
|
+
# * :date_of_birth (Date)
|
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
|
+
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
2335
|
+
# * :phone_consent (Boolean)
|
2336
|
+
# * :email (String)
|
2337
|
+
# * :email_consent (Boolean)
|
2338
|
+
# * :non_insurance_payers (Array<String>)
|
1574
2339
|
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
1575
2340
|
# for billing purpose.
|
1576
2341
|
# Box 12 on the CMS-1500 claim form.
|
@@ -1624,12 +2389,13 @@ module CandidApiClient
|
|
1624
2389
|
# onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15),
|
1625
2390
|
# last_menstrual_period_date: DateTime.parse(2023-01-15),
|
1626
2391
|
# delay_reason_code: C_1,
|
2392
|
+
# 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"] },
|
1627
2393
|
# patient_authorized_release: true,
|
1628
2394
|
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
|
1629
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 }
|
1630
2396
|
# )
|
1631
2397
|
def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
|
1632
|
-
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_authorized_release: nil, schema_instances: nil, vitals: nil, request_options: 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)
|
1633
2399
|
Async do
|
1634
2400
|
response = @request_client.conn.patch do |req|
|
1635
2401
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -1666,6 +2432,7 @@ module CandidApiClient
|
|
1666
2432
|
onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
|
1667
2433
|
last_menstrual_period_date: last_menstrual_period_date,
|
1668
2434
|
delay_reason_code: delay_reason_code,
|
2435
|
+
patient: patient,
|
1669
2436
|
patient_authorized_release: patient_authorized_release,
|
1670
2437
|
schema_instances: schema_instances,
|
1671
2438
|
vitals: vitals
|