candidhealth 0.39.2 → 0.39.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/candidhealth/charge_capture/v_1/client.rb +16 -0
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +18 -2
- data/lib/candidhealth/commons/types/epsdt_referral_condition_indicator_code.rb +14 -0
- data/lib/candidhealth/encounters/v_4/client.rb +1112 -1192
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +17 -1
- data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +627 -0
- data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +18 -2
- data/lib/candidhealth/encounters/v_4/types/epsdt_referral.rb +85 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +6 -6
- data/lib/candidhealth/service_lines/v_2/client.rb +12 -4
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +26 -2
- data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +25 -1
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +26 -2
- data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +26 -2
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +3 -0
- metadata +5 -2
@@ -34,6 +34,8 @@ 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 "types/epsdt_referral"
|
38
|
+
require_relative "types/encounter_create_from_pre_encounter"
|
37
39
|
require_relative "../../individual/types/patient_update"
|
38
40
|
require_relative "types/vitals_update"
|
39
41
|
require_relative "../../encounter_providers/v_2/types/rendering_provider_update"
|
@@ -471,6 +473,8 @@ module CandidApiClient
|
|
471
473
|
# `service_line.diagnosis_pointers`must contain at least one entry which should be
|
472
474
|
# in bounds of the diagnoses list field.Request of type Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>, as a Hash
|
473
475
|
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
476
|
+
# * :has_epsdt_indicator (Boolean)
|
477
|
+
# * :has_family_planning_indicator (Boolean)
|
474
478
|
# * :procedure_code (String)
|
475
479
|
# * :quantity (String)
|
476
480
|
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
@@ -519,8 +523,7 @@ module CandidApiClient
|
|
519
523
|
# * :city (String)
|
520
524
|
# * :state (CandidApiClient::Commons::Types::State)
|
521
525
|
# * :zip_code (String)
|
522
|
-
# @param external_claim_submission [Hash]
|
523
|
-
# To be included for claims that have been submitted outside of Candid.
|
526
|
+
# @param external_claim_submission [Hash] To be included for claims that have been submitted outside of Candid.
|
524
527
|
# Candid supports posting remits and payments to these claims and working them
|
525
528
|
# in-platform (e.g. editing, resubmitting).Request of type CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate, as a Hash
|
526
529
|
# * :claim_created_at (DateTime)
|
@@ -533,6 +536,11 @@ module CandidApiClient
|
|
533
536
|
# * :schema_id (String)
|
534
537
|
# * :content (Hash{String => Object})
|
535
538
|
# @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
|
539
|
+
# @param epsdt_referral [Hash] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
|
540
|
+
# 837P formRequest of type CandidApiClient::Encounters::V4::Types::EpsdtReferral, as a Hash
|
541
|
+
# * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
542
|
+
# * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
543
|
+
# * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
536
544
|
# @param request_options [CandidApiClient::RequestOptions]
|
537
545
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
538
546
|
# @example
|
@@ -550,19 +558,20 @@ module CandidApiClient
|
|
550
558
|
# prior_authorization_number: "string",
|
551
559
|
# responsible_party: INSURANCE_PAY,
|
552
560
|
# diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
|
553
|
-
# clinical_notes: [{ category: CLINICAL, notes:
|
561
|
+
# clinical_notes: [{ category: CLINICAL, notes: }],
|
554
562
|
# billing_notes: [{ text: "string" }],
|
555
563
|
# place_of_service_code: PHARMACY,
|
556
564
|
# 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" }] }] }] }],
|
557
|
-
# service_lines: [{
|
565
|
+
# service_lines: [{ procedure_code: "string", quantity: "string", units: MJ, diagnosis_pointers: }],
|
558
566
|
# 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" } },
|
559
567
|
# 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 }] },
|
560
568
|
# tag_ids: ["string"],
|
561
569
|
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
|
562
|
-
# referral_number: "string"
|
570
|
+
# referral_number: "string",
|
571
|
+
# epsdt_referral: { condition_indicator_1: AV, condition_indicator_2: AV, condition_indicator_3: AV }
|
563
572
|
# )
|
564
573
|
def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
|
565
|
-
provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, request_options: nil)
|
574
|
+
provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, epsdt_referral: nil, request_options: nil)
|
566
575
|
response = @request_client.conn.post do |req|
|
567
576
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
568
577
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -616,7 +625,8 @@ module CandidApiClient
|
|
616
625
|
external_claim_submission: external_claim_submission,
|
617
626
|
tag_ids: tag_ids,
|
618
627
|
schema_instances: schema_instances,
|
619
|
-
referral_number: referral_number
|
628
|
+
referral_number: referral_number,
|
629
|
+
epsdt_referral: epsdt_referral
|
620
630
|
}.compact
|
621
631
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
622
632
|
request_options: request_options)}/api/encounters/v4"
|
@@ -644,247 +654,25 @@ module CandidApiClient
|
|
644
654
|
# the patient or appointment is updated, assuming the
|
645
655
|
# encounter has not already been submitted or adjudicated.
|
646
656
|
#
|
647
|
-
# @param
|
648
|
-
#
|
649
|
-
#
|
650
|
-
#
|
651
|
-
#
|
652
|
-
#
|
653
|
-
#
|
654
|
-
#
|
655
|
-
#
|
656
|
-
#
|
657
|
-
#
|
658
|
-
#
|
659
|
-
#
|
660
|
-
#
|
661
|
-
#
|
662
|
-
#
|
663
|
-
#
|
664
|
-
#
|
665
|
-
#
|
666
|
-
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
667
|
-
# for billing purpose.
|
668
|
-
# Box 12 on the CMS-1500 claim form.
|
669
|
-
# @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you,
|
670
|
-
# not them. If false, patient may receive reimbursement.
|
671
|
-
# Box 13 on the CMS-1500 claim form.
|
672
|
-
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
|
673
|
-
# to be made to you, not them.
|
674
|
-
# Box 27 on the CMS-1500 claim form.
|
675
|
-
# @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
676
|
-
# Headaches").
|
677
|
-
# @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
|
678
|
-
# * :name (String)
|
679
|
-
# * :rx_cui (String)
|
680
|
-
# * :dosage (String)
|
681
|
-
# * :dosage_form (String)
|
682
|
-
# * :frequency (String)
|
683
|
-
# * :as_needed (Boolean)
|
684
|
-
# @param vitals [Hash] Request of type CandidApiClient::Encounters::V4::Types::Vitals, as a Hash
|
685
|
-
# * :height_in (Integer)
|
686
|
-
# * :weight_lbs (Integer)
|
687
|
-
# * :blood_pressure_systolic_mmhg (Integer)
|
688
|
-
# * :blood_pressure_diastolic_mmhg (Integer)
|
689
|
-
# * :body_temperature_f (Float)
|
690
|
-
# * :hemoglobin_gdl (Float)
|
691
|
-
# * :hematocrit_pct (Float)
|
692
|
-
# @param interventions [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Intervention>, as a Hash
|
693
|
-
# * :name (String)
|
694
|
-
# * :category (CandidApiClient::Encounters::V4::Types::InterventionCategory)
|
695
|
-
# * :description (String)
|
696
|
-
# * :medication (Hash)
|
697
|
-
# * :name (String)
|
698
|
-
# * :rx_cui (String)
|
699
|
-
# * :dosage (String)
|
700
|
-
# * :dosage_form (String)
|
701
|
-
# * :frequency (String)
|
702
|
-
# * :as_needed (Boolean)
|
703
|
-
# * :labs (Array<CandidApiClient::Encounters::V4::Types::Lab>)
|
704
|
-
# @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
|
705
|
-
# * :zip_plus_four_code (String)
|
706
|
-
# * :address_1 (String)
|
707
|
-
# * :address_2 (String)
|
708
|
-
# * :city (String)
|
709
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
710
|
-
# * :zip_code (String)
|
711
|
-
# @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
|
712
|
-
# Asynchronous encounters occur when providers and patients communicate online
|
713
|
-
# using
|
714
|
-
# forms, instant messaging, or other pre-recorded digital mediums.
|
715
|
-
# Synchronous encounters occur in live, real-time settings where the patient
|
716
|
-
# interacts
|
717
|
-
# directly with the provider, such as over video or a phone call.
|
718
|
-
# @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
|
719
|
-
# Examples for when this should be set to NOT_BILLABLE include
|
720
|
-
# if the Encounter has not occurred yet or if there is no intention of ever
|
721
|
-
# billing the responsible_party.
|
722
|
-
# @param additional_information [String] Defines additional information on the claim needed by the payer.
|
723
|
-
# Box 19 on the CMS-1500 claim form.
|
724
|
-
# @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
|
725
|
-
# Required when mandated by government law or regulation to obtain authorization
|
726
|
-
# for specific service(s) but, for the
|
727
|
-
# reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
|
728
|
-
# the service was performed without
|
729
|
-
# obtaining the authorization.
|
730
|
-
# @param admission_date [Date] 837p Loop2300 DTP\*435, CMS-1500 Box 18
|
731
|
-
# Required on all ambulance claims when the patient was known to be admitted to
|
732
|
-
# the hospital.
|
733
|
-
# OR
|
734
|
-
# Required on all claims involving inpatient medical visits.
|
735
|
-
# @param discharge_date [Date] 837p Loop2300 DTP\*096, CMS-1500 Box 18
|
736
|
-
# Required for inpatient claims when the patient was discharged from the facility
|
737
|
-
# and the discharge date is known.
|
738
|
-
# @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP\*431, CMS-1500 Box 14
|
739
|
-
# Required for the initial medical service or visit performed in response to a
|
740
|
-
# medical emergency when the date is available and is different than the date of
|
741
|
-
# service.
|
742
|
-
# OR
|
743
|
-
# This date is the onset of acute symptoms for the current illness or condition.
|
744
|
-
# @param last_menstrual_period_date [Date] 837p Loop2300 DTP\*484, CMS-1500 Box 14
|
745
|
-
# Required when, in the judgment of the provider, the services on this claim are
|
746
|
-
# related to the patient's pregnancy.
|
747
|
-
# @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
|
748
|
-
# Code indicating the reason why a request was delayed
|
749
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
750
|
-
# @param _field_set [Object]
|
751
|
-
# @param pre_encounter_patient_id [String]
|
752
|
-
# @param pre_encounter_appointment_ids [Array<String>]
|
753
|
-
# @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
|
754
|
-
# Billing provider may be, but is not necessarily, the same person/NPI as the
|
755
|
-
# rendering provider. From a payer's perspective, this represents the person or
|
756
|
-
# entity being reimbursed. When a contract exists with the target payer, the
|
757
|
-
# billing provider should be the entity contracted with the payer. In some
|
758
|
-
# circumstances, this will be an individual provider. In that case, submit that
|
759
|
-
# provider's NPI and the tax ID (TIN) that the provider gave to the payer during
|
760
|
-
# contracting. In other cases, the billing entity will be a medical group. If so,
|
761
|
-
# 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
|
762
|
-
# * :address (Hash)
|
763
|
-
# * :zip_plus_four_code (String)
|
764
|
-
# * :address_1 (String)
|
765
|
-
# * :address_2 (String)
|
766
|
-
# * :city (String)
|
767
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
768
|
-
# * :zip_code (String)
|
769
|
-
# * :tax_id (String)
|
770
|
-
# * :npi (String)
|
771
|
-
# * :taxonomy_code (String)
|
772
|
-
# * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
|
773
|
-
# * :first_name (String)
|
774
|
-
# * :last_name (String)
|
775
|
-
# * :organization_name (String)
|
776
|
-
# @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
|
777
|
-
# etc. -- performing the service.
|
778
|
-
# For telehealth services, the rendering provider performs the visit, asynchronous
|
779
|
-
# communication, or other service. The rendering provider address should generally
|
780
|
-
# be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProvider, as a Hash
|
781
|
-
# * :npi (String)
|
782
|
-
# * :taxonomy_code (String)
|
783
|
-
# * :address (Hash)
|
784
|
-
# * :zip_plus_four_code (String)
|
785
|
-
# * :address_1 (String)
|
786
|
-
# * :address_2 (String)
|
787
|
-
# * :city (String)
|
788
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
789
|
-
# * :zip_code (String)
|
790
|
-
# * :first_name (String)
|
791
|
-
# * :last_name (String)
|
792
|
-
# * :organization_name (String)
|
793
|
-
# @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
|
794
|
-
# this loop to
|
795
|
-
# indicate the initial referral from the primary care provider or whatever
|
796
|
-
# provider wrote the initial referral for this patient's episode of care being
|
797
|
-
# billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider, as a Hash
|
798
|
-
# * :npi (String)
|
799
|
-
# * :taxonomy_code (String)
|
800
|
-
# * :address (Hash)
|
801
|
-
# * :zip_plus_four_code (String)
|
802
|
-
# * :address_1 (String)
|
803
|
-
# * :address_2 (String)
|
804
|
-
# * :city (String)
|
805
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
806
|
-
# * :zip_code (String)
|
807
|
-
# * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
|
808
|
-
# * :first_name (String)
|
809
|
-
# * :last_name (String)
|
810
|
-
# * :organization_name (String)
|
811
|
-
# @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
|
812
|
-
# required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider, as a Hash
|
813
|
-
# * :npi (String)
|
814
|
-
# * :taxonomy_code (String)
|
815
|
-
# * :address (Hash)
|
816
|
-
# * :zip_plus_four_code (String)
|
817
|
-
# * :address_1 (String)
|
818
|
-
# * :address_2 (String)
|
819
|
-
# * :city (String)
|
820
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
821
|
-
# * :zip_code (String)
|
822
|
-
# * :first_name (String)
|
823
|
-
# * :last_name (String)
|
824
|
-
# * :organization_name (String)
|
825
|
-
# @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
|
826
|
-
# rendered, such as a provider office or hospital. For telehealth, service
|
827
|
-
# facility can represent the provider's location when the service was delivered
|
828
|
-
# (e.g., home), or the location where an in-person visit would have taken place,
|
829
|
-
# whichever is easier to identify. If the provider is in-network, service facility
|
830
|
-
# may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
|
831
|
-
# for an in-network claim to be successfully adjudicated, the service facility
|
832
|
-
# address listed on claims must match what was provided to the payer during the
|
833
|
-
# credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase, as a Hash
|
834
|
-
# * :organization_name (String)
|
835
|
-
# * :npi (String)
|
836
|
-
# * :address (Hash)
|
837
|
-
# * :zip_plus_four_code (String)
|
838
|
-
# * :address_1 (String)
|
839
|
-
# * :address_2 (String)
|
840
|
-
# * :city (String)
|
841
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
842
|
-
# * :zip_code (String)
|
843
|
-
# * :secondary_identification (String)
|
844
|
-
# @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
845
|
-
# diagnoses
|
846
|
-
# may be submitted at this time, and coders will later prioritize the 12 that will
|
847
|
-
# be
|
848
|
-
# submitted to the payor.Request of type Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>, as a Hash
|
849
|
-
# * :name (String)
|
850
|
-
# * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
|
851
|
-
# * :code (String)
|
852
|
-
# @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
|
853
|
-
# patient encounters.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
|
854
|
-
# * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
|
855
|
-
# * :notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNote>)
|
856
|
-
# @param billing_notes [Array<Hash>] Spot to store misc, human-readable, notes about this encounter to be used
|
857
|
-
# in the billing process.Request of type Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>, as a Hash
|
858
|
-
# * :text (String)
|
859
|
-
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
|
860
|
-
# telemedicine, 11 for in-person. Full list [here](https://www.cms
|
861
|
-
# .gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
862
|
-
# @param patient_histories [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>, as a Hash
|
863
|
-
# * :category (CandidApiClient::Encounters::V4::Types::PatientHistoryCategoryEnum)
|
864
|
-
# * :questions (Array<CandidApiClient::Encounters::V4::Types::IntakeQuestion>)
|
865
|
-
# @param service_lines [Array<Hash>] Each service line must be linked to a diagnosis. Concretely,
|
866
|
-
# `service_line.diagnosis_pointers`must contain at least one entry which should be
|
867
|
-
# in bounds of the diagnoses list field.Request of type Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>, as a Hash
|
868
|
-
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
869
|
-
# * :procedure_code (String)
|
870
|
-
# * :quantity (String)
|
871
|
-
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
872
|
-
# * :charge_amount_cents (Integer)
|
873
|
-
# * :diagnosis_pointers (Array<Integer>)
|
874
|
-
# * :drug_identification (Hash)
|
875
|
-
# * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
|
876
|
-
# * :national_drug_code (String)
|
877
|
-
# * :national_drug_unit_count (String)
|
878
|
-
# * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
|
879
|
-
# * :link_sequence_number (String)
|
880
|
-
# * :pharmacy_prescription_number (String)
|
881
|
-
# * :conversion_formula (String)
|
882
|
-
# * :drug_description (String)
|
883
|
-
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
884
|
-
# * :description (String)
|
885
|
-
# * :date_of_service (Date)
|
886
|
-
# * :end_date_of_service (Date)
|
887
|
-
# * :ordering_provider (Hash)
|
657
|
+
# @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreateFromPreEncounter, as a Hash
|
658
|
+
# * :pre_encounter_patient_id (String)
|
659
|
+
# * :pre_encounter_appointment_ids (Array<String>)
|
660
|
+
# * :billing_provider (Hash)
|
661
|
+
# * :address (Hash)
|
662
|
+
# * :zip_plus_four_code (String)
|
663
|
+
# * :address_1 (String)
|
664
|
+
# * :address_2 (String)
|
665
|
+
# * :city (String)
|
666
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
667
|
+
# * :zip_code (String)
|
668
|
+
# * :tax_id (String)
|
669
|
+
# * :npi (String)
|
670
|
+
# * :taxonomy_code (String)
|
671
|
+
# * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
|
672
|
+
# * :first_name (String)
|
673
|
+
# * :last_name (String)
|
674
|
+
# * :organization_name (String)
|
675
|
+
# * :rendering_provider (Hash)
|
888
676
|
# * :npi (String)
|
889
677
|
# * :taxonomy_code (String)
|
890
678
|
# * :address (Hash)
|
@@ -897,44 +685,95 @@ module CandidApiClient
|
|
897
685
|
# * :first_name (String)
|
898
686
|
# * :last_name (String)
|
899
687
|
# * :organization_name (String)
|
900
|
-
# * :
|
901
|
-
#
|
902
|
-
#
|
903
|
-
#
|
904
|
-
#
|
905
|
-
#
|
906
|
-
#
|
907
|
-
#
|
908
|
-
#
|
909
|
-
#
|
910
|
-
#
|
911
|
-
#
|
912
|
-
#
|
913
|
-
#
|
688
|
+
# * :initial_referring_provider (Hash)
|
689
|
+
# * :npi (String)
|
690
|
+
# * :taxonomy_code (String)
|
691
|
+
# * :address (Hash)
|
692
|
+
# * :zip_plus_four_code (String)
|
693
|
+
# * :address_1 (String)
|
694
|
+
# * :address_2 (String)
|
695
|
+
# * :city (String)
|
696
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
697
|
+
# * :zip_code (String)
|
698
|
+
# * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
|
699
|
+
# * :first_name (String)
|
700
|
+
# * :last_name (String)
|
701
|
+
# * :organization_name (String)
|
702
|
+
# * :supervising_provider (Hash)
|
703
|
+
# * :npi (String)
|
704
|
+
# * :taxonomy_code (String)
|
705
|
+
# * :address (Hash)
|
706
|
+
# * :zip_plus_four_code (String)
|
707
|
+
# * :address_1 (String)
|
708
|
+
# * :address_2 (String)
|
709
|
+
# * :city (String)
|
710
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
711
|
+
# * :zip_code (String)
|
712
|
+
# * :first_name (String)
|
713
|
+
# * :last_name (String)
|
714
|
+
# * :organization_name (String)
|
715
|
+
# * :service_facility (Hash)
|
716
|
+
# * :organization_name (String)
|
717
|
+
# * :npi (String)
|
718
|
+
# * :address (Hash)
|
719
|
+
# * :zip_plus_four_code (String)
|
720
|
+
# * :address_1 (String)
|
721
|
+
# * :address_2 (String)
|
722
|
+
# * :city (String)
|
723
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
724
|
+
# * :zip_code (String)
|
725
|
+
# * :secondary_identification (String)
|
726
|
+
# * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
|
727
|
+
# * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
|
728
|
+
# * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
|
729
|
+
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
730
|
+
# * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
|
731
|
+
# * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
|
732
|
+
# * :external_claim_submission (Hash)
|
733
|
+
# * :claim_created_at (DateTime)
|
734
|
+
# * :patient_control_number (String)
|
735
|
+
# * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
|
736
|
+
# * :tag_ids (Array<String>)
|
737
|
+
# * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
|
738
|
+
# * :external_id (String)
|
739
|
+
# * :date_of_service (Date)
|
740
|
+
# * :end_date_of_service (Date)
|
741
|
+
# * :patient_authorized_release (Boolean)
|
742
|
+
# * :benefits_assigned_to_provider (Boolean)
|
743
|
+
# * :provider_accepts_assignment (Boolean)
|
744
|
+
# * :appointment_type (String)
|
745
|
+
# * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
|
746
|
+
# * :vitals (Hash)
|
747
|
+
# * :height_in (Integer)
|
748
|
+
# * :weight_lbs (Integer)
|
749
|
+
# * :blood_pressure_systolic_mmhg (Integer)
|
750
|
+
# * :blood_pressure_diastolic_mmhg (Integer)
|
751
|
+
# * :body_temperature_f (Float)
|
752
|
+
# * :hemoglobin_gdl (Float)
|
753
|
+
# * :hematocrit_pct (Float)
|
754
|
+
# * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
|
755
|
+
# * :pay_to_address (Hash)
|
756
|
+
# * :zip_plus_four_code (String)
|
757
|
+
# * :address_1 (String)
|
758
|
+
# * :address_2 (String)
|
759
|
+
# * :city (String)
|
760
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
761
|
+
# * :zip_code (String)
|
762
|
+
# * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
|
763
|
+
# * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
|
764
|
+
# * :additional_information (String)
|
765
|
+
# * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
|
766
|
+
# * :admission_date (Date)
|
767
|
+
# * :discharge_date (Date)
|
768
|
+
# * :onset_of_current_illness_or_symptom_date (Date)
|
769
|
+
# * :last_menstrual_period_date (Date)
|
770
|
+
# * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
|
914
771
|
# @param request_options [CandidApiClient::RequestOptions]
|
915
772
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
916
773
|
# @example
|
917
774
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
918
|
-
# api.encounters.v_4.create_from_pre_encounter_patient(
|
919
|
-
|
920
|
-
# pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"],
|
921
|
-
# 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", provider_commercial_license_type: LICENSED_CLINICAL_SOCIAL_WORKER, first_name: "string", last_name: "string", organization_name: "string" },
|
922
|
-
# rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
|
923
|
-
# 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" },
|
924
|
-
# 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" },
|
925
|
-
# 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" }, secondary_identification: "string" },
|
926
|
-
# diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
|
927
|
-
# clinical_notes: [{ category: CLINICAL, notes: [{ text: "string", author_name: "string", author_npi: "string", timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }] }],
|
928
|
-
# billing_notes: [{ text: "string" }],
|
929
|
-
# place_of_service_code: PHARMACY,
|
930
|
-
# 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" }] }] }] }],
|
931
|
-
# 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", drug_description: "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" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }] }],
|
932
|
-
# 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 }] },
|
933
|
-
# tag_ids: ["string"],
|
934
|
-
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
935
|
-
# )
|
936
|
-
def create_from_pre_encounter_patient(external_id:, patient_authorized_release:,
|
937
|
-
benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_ids:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
|
775
|
+
# api.encounters.v_4.create_from_pre_encounter_patient(request: { pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], 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", provider_commercial_license_type: LICENSED_CLINICAL_SOCIAL_WORKER, first_name: "string", last_name: "string", organization_name: "string" }, rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" }, 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" }, 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" }, 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" }, secondary_identification: "string" }, diagnoses: [{ name: "string", code_type: ABF, code: "string" }], clinical_notes: [{ category: CLINICAL, notes: }], billing_notes: [{ text: "string" }], place_of_service_code: PHARMACY, 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" }] }] }] }], service_lines: [{ procedure_code: "string", quantity: "string", units: MJ, diagnosis_pointers: }], 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 }] }, tag_ids: ["string"], schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }], external_id: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, appointment_type: "string", existing_medications: [{ name: "Lisinopril", rx_cui: "860975", dosage: "10mg", dosage_form: "Tablet", frequency: "Once Daily", as_needed: true }], 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 }, interventions: [{ name: "Physical Therapy Session", category: LIFESTYLE, description: "A session focused on improving muscular strength, flexibility, and range of motion post-injury.", medication: { name: "Lisinopril", rx_cui: "860975", dosage: "10mg", dosage_form: "Tablet", frequency: "Once Daily", as_needed: true }, labs: [{ name: "Genetic Health Labs", code: "GH12345", code_type: QUEST }] }], 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" }, synchronicity: SYNCHRONOUS, billable_status: BILLABLE, additional_information: "string", service_authorization_exception_code: C_1, admission_date: DateTime.parse(2023-01-15), discharge_date: DateTime.parse(2023-01-15), onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15), last_menstrual_period_date: DateTime.parse(2023-01-15), delay_reason_code: C_1 })
|
776
|
+
def create_from_pre_encounter_patient(request:, request_options: nil)
|
938
777
|
response = @request_client.conn.post do |req|
|
939
778
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
940
779
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -943,608 +782,190 @@ module CandidApiClient
|
|
943
782
|
**@request_client.get_headers,
|
944
783
|
**(request_options&.additional_headers || {})
|
945
784
|
}.compact
|
946
|
-
req.body = {
|
947
|
-
**(request_options&.additional_body_parameters || {}),
|
948
|
-
external_id: external_id,
|
949
|
-
date_of_service: date_of_service,
|
950
|
-
end_date_of_service: end_date_of_service,
|
951
|
-
patient_authorized_release: patient_authorized_release,
|
952
|
-
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
953
|
-
provider_accepts_assignment: provider_accepts_assignment,
|
954
|
-
appointment_type: appointment_type,
|
955
|
-
existing_medications: existing_medications,
|
956
|
-
vitals: vitals,
|
957
|
-
interventions: interventions,
|
958
|
-
pay_to_address: pay_to_address,
|
959
|
-
synchronicity: synchronicity,
|
960
|
-
billable_status: billable_status,
|
961
|
-
additional_information: additional_information,
|
962
|
-
service_authorization_exception_code: service_authorization_exception_code,
|
963
|
-
admission_date: admission_date,
|
964
|
-
discharge_date: discharge_date,
|
965
|
-
onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
|
966
|
-
last_menstrual_period_date: last_menstrual_period_date,
|
967
|
-
delay_reason_code: delay_reason_code,
|
968
|
-
additional_properties: additional_properties,
|
969
|
-
_field_set: _field_set,
|
970
|
-
pre_encounter_patient_id: pre_encounter_patient_id,
|
971
|
-
pre_encounter_appointment_ids: pre_encounter_appointment_ids,
|
972
|
-
billing_provider: billing_provider,
|
973
|
-
rendering_provider: rendering_provider,
|
974
|
-
initial_referring_provider: initial_referring_provider,
|
975
|
-
supervising_provider: supervising_provider,
|
976
|
-
service_facility: service_facility,
|
977
|
-
diagnoses: diagnoses,
|
978
|
-
clinical_notes: clinical_notes,
|
979
|
-
billing_notes: billing_notes,
|
980
|
-
place_of_service_code: place_of_service_code,
|
981
|
-
patient_histories: patient_histories,
|
982
|
-
service_lines: service_lines,
|
983
|
-
external_claim_submission: external_claim_submission,
|
984
|
-
tag_ids: tag_ids,
|
985
|
-
schema_instances: schema_instances
|
986
|
-
}.compact
|
785
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
987
786
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
988
787
|
request_options: request_options)}/api/encounters/v4/create-from-pre-encounter"
|
989
788
|
end
|
990
789
|
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
991
790
|
end
|
992
791
|
|
993
|
-
#
|
994
|
-
#
|
995
|
-
#
|
996
|
-
#
|
997
|
-
#
|
998
|
-
#
|
999
|
-
#
|
1000
|
-
#
|
1001
|
-
#
|
1002
|
-
#
|
1003
|
-
#
|
1004
|
-
#
|
1005
|
-
#
|
1006
|
-
#
|
1007
|
-
#
|
1008
|
-
#
|
1009
|
-
#
|
1010
|
-
#
|
1011
|
-
#
|
1012
|
-
#
|
1013
|
-
#
|
1014
|
-
# * :
|
1015
|
-
#
|
1016
|
-
# * :
|
1017
|
-
#
|
1018
|
-
#
|
1019
|
-
#
|
1020
|
-
#
|
1021
|
-
#
|
1022
|
-
#
|
1023
|
-
#
|
1024
|
-
#
|
1025
|
-
#
|
1026
|
-
#
|
1027
|
-
#
|
1028
|
-
#
|
1029
|
-
#
|
1030
|
-
#
|
1031
|
-
#
|
1032
|
-
#
|
1033
|
-
#
|
1034
|
-
#
|
1035
|
-
#
|
1036
|
-
#
|
1037
|
-
#
|
1038
|
-
#
|
1039
|
-
#
|
1040
|
-
#
|
1041
|
-
#
|
1042
|
-
#
|
1043
|
-
#
|
1044
|
-
#
|
1045
|
-
#
|
1046
|
-
#
|
1047
|
-
#
|
1048
|
-
#
|
1049
|
-
#
|
1050
|
-
#
|
1051
|
-
#
|
1052
|
-
#
|
1053
|
-
#
|
1054
|
-
# * :
|
1055
|
-
# * :
|
1056
|
-
# * :
|
1057
|
-
# * :
|
1058
|
-
#
|
1059
|
-
# * :
|
1060
|
-
# * :
|
1061
|
-
# * :
|
1062
|
-
#
|
1063
|
-
#
|
1064
|
-
#
|
1065
|
-
#
|
1066
|
-
#
|
1067
|
-
#
|
1068
|
-
# * :
|
1069
|
-
# * :
|
1070
|
-
# * :
|
1071
|
-
# * :
|
1072
|
-
#
|
1073
|
-
#
|
1074
|
-
#
|
1075
|
-
#
|
1076
|
-
#
|
1077
|
-
#
|
1078
|
-
#
|
1079
|
-
#
|
1080
|
-
#
|
1081
|
-
# * :
|
1082
|
-
#
|
1083
|
-
#
|
1084
|
-
#
|
1085
|
-
#
|
1086
|
-
#
|
1087
|
-
#
|
1088
|
-
# * :
|
1089
|
-
#
|
1090
|
-
#
|
1091
|
-
# * :
|
1092
|
-
#
|
1093
|
-
#
|
1094
|
-
#
|
1095
|
-
#
|
1096
|
-
#
|
1097
|
-
# * :
|
1098
|
-
# * :
|
1099
|
-
# * :
|
1100
|
-
#
|
1101
|
-
#
|
1102
|
-
#
|
1103
|
-
#
|
1104
|
-
#
|
1105
|
-
#
|
1106
|
-
#
|
1107
|
-
#
|
1108
|
-
#
|
1109
|
-
#
|
1110
|
-
#
|
1111
|
-
#
|
1112
|
-
#
|
1113
|
-
#
|
1114
|
-
#
|
1115
|
-
#
|
1116
|
-
#
|
1117
|
-
#
|
1118
|
-
#
|
1119
|
-
#
|
1120
|
-
#
|
1121
|
-
#
|
1122
|
-
#
|
1123
|
-
#
|
1124
|
-
#
|
1125
|
-
#
|
1126
|
-
#
|
1127
|
-
# @param
|
1128
|
-
#
|
1129
|
-
#
|
1130
|
-
#
|
1131
|
-
#
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
#
|
1149
|
-
#
|
1150
|
-
#
|
1151
|
-
#
|
1152
|
-
#
|
1153
|
-
#
|
1154
|
-
#
|
1155
|
-
#
|
1156
|
-
#
|
1157
|
-
#
|
1158
|
-
#
|
1159
|
-
#
|
1160
|
-
#
|
1161
|
-
#
|
1162
|
-
#
|
1163
|
-
#
|
1164
|
-
#
|
1165
|
-
#
|
1166
|
-
#
|
1167
|
-
#
|
1168
|
-
# * :
|
1169
|
-
#
|
1170
|
-
# Note all current existing medications on encounter will be overridden with this
|
1171
|
-
# list.Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
|
1172
|
-
# * :name (String)
|
1173
|
-
# * :rx_cui (String)
|
1174
|
-
# * :dosage (String)
|
1175
|
-
# * :dosage_form (String)
|
1176
|
-
# * :frequency (String)
|
1177
|
-
# * :as_needed (Boolean)
|
1178
|
-
# @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
|
1179
|
-
# etc. -- performing the service.
|
1180
|
-
# For telehealth services, the rendering provider performs the visit, asynchronous
|
1181
|
-
# communication, or other service. The rendering provider address should generally
|
1182
|
-
# be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProviderUpdate, as a Hash
|
1183
|
-
# * :npi (String)
|
1184
|
-
# * :taxonomy_code (String)
|
1185
|
-
# * :address (Hash)
|
1186
|
-
# * :zip_plus_four_code (String)
|
1187
|
-
# * :address_1 (String)
|
1188
|
-
# * :address_2 (String)
|
1189
|
-
# * :city (String)
|
1190
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1191
|
-
# * :zip_code (String)
|
1192
|
-
# * :first_name (String)
|
1193
|
-
# * :last_name (String)
|
1194
|
-
# * :organization_name (String)
|
1195
|
-
# @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
|
1196
|
-
# rendered, such as a provider office or hospital. For telehealth, service
|
1197
|
-
# facility can represent the provider's location when the service was delivered
|
1198
|
-
# (e.g., home), or the location where an in-person visit would have taken place,
|
1199
|
-
# whichever is easier to identify. If the provider is in-network, service facility
|
1200
|
-
# may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
|
1201
|
-
# for an in-network claim to be successfully adjudicated, the service facility
|
1202
|
-
# address listed on claims must match what was provided to the payer during the
|
1203
|
-
# credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate, as a Hash
|
1204
|
-
# * :organization_name (String)
|
1205
|
-
# * :npi (String)
|
1206
|
-
# * :address (Hash)
|
1207
|
-
# * :zip_plus_four_code (String)
|
1208
|
-
# * :address_1 (String)
|
1209
|
-
# * :address_2 (String)
|
1210
|
-
# * :city (String)
|
1211
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1212
|
-
# * :zip_code (String)
|
1213
|
-
# * :secondary_identification (String)
|
1214
|
-
# @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorUpdate, as a Hash
|
1215
|
-
# * :first_name (String)
|
1216
|
-
# * :last_name (String)
|
1217
|
-
# * :external_id (String)
|
1218
|
-
# * :date_of_birth (Date)
|
1219
|
-
# * :address (Hash)
|
1220
|
-
# * :zip_plus_four_code (String)
|
1221
|
-
# * :address_1 (String)
|
1222
|
-
# * :address_2 (String)
|
1223
|
-
# * :city (String)
|
1224
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1225
|
-
# * :zip_code (String)
|
1226
|
-
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1227
|
-
# * :phone_consent (Boolean)
|
1228
|
-
# * :email (String)
|
1229
|
-
# * :email_consent (Boolean)
|
1230
|
-
# @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
|
1231
|
-
# Billing provider may be, but is not necessarily, the same person/NPI as the
|
1232
|
-
# rendering provider. From a payer's perspective, this represents the person or
|
1233
|
-
# entity being reimbursed. When a contract exists with the target payer, the
|
1234
|
-
# billing provider should be the entity contracted with the payer. In some
|
1235
|
-
# circumstances, this will be an individual provider. In that case, submit that
|
1236
|
-
# provider's NPI and the tax ID (TIN) that the provider gave to the payer during
|
1237
|
-
# contracting. In other cases, the billing entity will be a medical group. If so,
|
1238
|
-
# 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::BillingProviderUpdate, as a Hash
|
1239
|
-
# * :address (Hash)
|
1240
|
-
# * :zip_plus_four_code (String)
|
1241
|
-
# * :address_1 (String)
|
1242
|
-
# * :address_2 (String)
|
1243
|
-
# * :city (String)
|
1244
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1245
|
-
# * :zip_code (String)
|
1246
|
-
# * :tax_id (String)
|
1247
|
-
# * :npi (String)
|
1248
|
-
# * :taxonomy_code (String)
|
1249
|
-
# * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
|
1250
|
-
# * :first_name (String)
|
1251
|
-
# * :last_name (String)
|
1252
|
-
# * :organization_name (String)
|
1253
|
-
# @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
|
1254
|
-
# required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash
|
1255
|
-
# * :npi (String)
|
1256
|
-
# * :taxonomy_code (String)
|
1257
|
-
# * :address (Hash)
|
1258
|
-
# * :zip_plus_four_code (String)
|
1259
|
-
# * :address_1 (String)
|
1260
|
-
# * :address_2 (String)
|
1261
|
-
# * :city (String)
|
1262
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1263
|
-
# * :zip_code (String)
|
1264
|
-
# * :first_name (String)
|
1265
|
-
# * :last_name (String)
|
1266
|
-
# * :organization_name (String)
|
1267
|
-
# @param referring_provider [Hash] The final provider who referred the services that were rendered.
|
1268
|
-
# All physicians who order services or refer Medicare beneficiaries must
|
1269
|
-
# report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate, as a Hash
|
1270
|
-
# * :npi (String)
|
1271
|
-
# * :taxonomy_code (String)
|
1272
|
-
# * :address (Hash)
|
1273
|
-
# * :zip_plus_four_code (String)
|
1274
|
-
# * :address_1 (String)
|
1275
|
-
# * :address_2 (String)
|
1276
|
-
# * :city (String)
|
1277
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1278
|
-
# * :zip_code (String)
|
1279
|
-
# * :first_name (String)
|
1280
|
-
# * :last_name (String)
|
1281
|
-
# * :organization_name (String)
|
1282
|
-
# @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
|
1283
|
-
# this loop to
|
1284
|
-
# indicate the initial referral from the primary care provider or whatever
|
1285
|
-
# provider wrote the initial referral for this patient's episode of care being
|
1286
|
-
# billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate, as a Hash
|
1287
|
-
# * :npi (String)
|
1288
|
-
# * :taxonomy_code (String)
|
1289
|
-
# * :address (Hash)
|
1290
|
-
# * :zip_plus_four_code (String)
|
1291
|
-
# * :address_1 (String)
|
1292
|
-
# * :address_2 (String)
|
1293
|
-
# * :city (String)
|
1294
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1295
|
-
# * :zip_code (String)
|
1296
|
-
# * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
|
1297
|
-
# * :first_name (String)
|
1298
|
-
# * :last_name (String)
|
1299
|
-
# * :organization_name (String)
|
1300
|
-
# @param referral_number [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
|
1301
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
1302
|
-
# @param _field_set [Object]
|
1303
|
-
# @param diagnosis_ids [Array<String>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
1304
|
-
# diagnoses
|
1305
|
-
# may be submitted at this time, and coders will later prioritize the 12 that will
|
1306
|
-
# be
|
1307
|
-
# submitted to the payor.
|
1308
|
-
# @param place_of_service_code_as_submitted [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
|
1309
|
-
# telemedicine, 11 for in-person. Full list
|
1310
|
-
# //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
1311
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
1312
|
-
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
1313
|
-
# @example
|
1314
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1315
|
-
# api.encounters.v_4.update(
|
1316
|
-
# encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
1317
|
-
# diagnosis_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"],
|
1318
|
-
# place_of_service_code_as_submitted: PHARMACY
|
1319
|
-
# )
|
1320
|
-
def update(encounter_id:, benefits_assigned_to_provider: nil, prior_authorization_number: nil,
|
1321
|
-
external_id: nil, date_of_service: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, billing_provider: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, referral_number: nil, additional_properties: nil, _field_set: nil, diagnosis_ids: nil, place_of_service_code_as_submitted: nil, request_options: nil)
|
1322
|
-
response = @request_client.conn.patch do |req|
|
1323
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1324
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1325
|
-
req.headers = {
|
1326
|
-
**(req.headers || {}),
|
1327
|
-
**@request_client.get_headers,
|
1328
|
-
**(request_options&.additional_headers || {})
|
1329
|
-
}.compact
|
1330
|
-
req.body = {
|
1331
|
-
**(request_options&.additional_body_parameters || {}),
|
1332
|
-
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
1333
|
-
prior_authorization_number: prior_authorization_number,
|
1334
|
-
external_id: external_id,
|
1335
|
-
date_of_service: date_of_service,
|
1336
|
-
tag_ids: tag_ids,
|
1337
|
-
clinical_notes: clinical_notes,
|
1338
|
-
pay_to_address: pay_to_address,
|
1339
|
-
billable_status: billable_status,
|
1340
|
-
responsible_party: responsible_party,
|
1341
|
-
provider_accepts_assignment: provider_accepts_assignment,
|
1342
|
-
synchronicity: synchronicity,
|
1343
|
-
place_of_service_code: place_of_service_code,
|
1344
|
-
appointment_type: appointment_type,
|
1345
|
-
end_date_of_service: end_date_of_service,
|
1346
|
-
subscriber_primary: subscriber_primary,
|
1347
|
-
subscriber_secondary: subscriber_secondary,
|
1348
|
-
additional_information: additional_information,
|
1349
|
-
service_authorization_exception_code: service_authorization_exception_code,
|
1350
|
-
admission_date: admission_date,
|
1351
|
-
discharge_date: discharge_date,
|
1352
|
-
onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
|
1353
|
-
last_menstrual_period_date: last_menstrual_period_date,
|
1354
|
-
delay_reason_code: delay_reason_code,
|
1355
|
-
patient: patient,
|
1356
|
-
patient_authorized_release: patient_authorized_release,
|
1357
|
-
schema_instances: schema_instances,
|
1358
|
-
vitals: vitals,
|
1359
|
-
existing_medications: existing_medications,
|
1360
|
-
rendering_provider: rendering_provider,
|
1361
|
-
service_facility: service_facility,
|
1362
|
-
guarantor: guarantor,
|
1363
|
-
billing_provider: billing_provider,
|
1364
|
-
supervising_provider: supervising_provider,
|
1365
|
-
referring_provider: referring_provider,
|
1366
|
-
initial_referring_provider: initial_referring_provider,
|
1367
|
-
referral_number: referral_number,
|
1368
|
-
additional_properties: additional_properties,
|
1369
|
-
_field_set: _field_set,
|
1370
|
-
diagnosis_ids: diagnosis_ids,
|
1371
|
-
place_of_service_code_as_submitted: place_of_service_code_as_submitted
|
1372
|
-
}.compact
|
1373
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
1374
|
-
request_options: request_options)}/api/encounters/v4/#{encounter_id}"
|
1375
|
-
end
|
1376
|
-
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
1377
|
-
end
|
1378
|
-
end
|
1379
|
-
|
1380
|
-
class AsyncV4Client
|
1381
|
-
# @return [CandidApiClient::AsyncRequestClient]
|
1382
|
-
attr_reader :request_client
|
1383
|
-
|
1384
|
-
# @param request_client [CandidApiClient::AsyncRequestClient]
|
1385
|
-
# @return [CandidApiClient::Encounters::V4::AsyncV4Client]
|
1386
|
-
def initialize(request_client:)
|
1387
|
-
@request_client = request_client
|
1388
|
-
end
|
1389
|
-
|
1390
|
-
# @param limit [Integer] Maximum number of entities per page, defaults to 100.
|
1391
|
-
# @param claim_status [CandidApiClient::Claims::Types::ClaimStatus] Indicates the current status of an insurance claim within the billing process.
|
1392
|
-
# @param sort [CandidApiClient::Encounters::V4::Types::EncounterSortOptions] Defaults to created_at:desc.
|
1393
|
-
# @param page_token [String]
|
1394
|
-
# @param date_of_service_min [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1395
|
-
# @param date_of_service_max [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1396
|
-
# @param primary_payer_names [String] Comma delimited string.
|
1397
|
-
# @param search_term [String] Filter by any of the following fields: encounter_id, claim_id, patient
|
1398
|
-
# external_id,
|
1399
|
-
# patient date of birth, patient first name, patient last name,
|
1400
|
-
# or encounter external id.
|
1401
|
-
# @param external_id [String] Filter to an exact match on encounter external_id, if one exists.
|
1402
|
-
# @param diagnoses_updated_since [DateTime] ISO 8601 timestamp; ideally in UTC (although not required):
|
1403
|
-
# 2019-08-24T14:15:22Z.
|
1404
|
-
# @param tag_ids [String] Filter by name of tags on encounters.
|
1405
|
-
# @param work_queue_id [String]
|
1406
|
-
# @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
|
1407
|
-
# Examples for when this should be set to NOT_BILLABLE include if the Encounter
|
1408
|
-
# has not occurred yet or if there is no intention of ever billing the
|
1409
|
-
# responsible_party.
|
1410
|
-
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
|
1411
|
-
# SELF_PAY if you intend to bill self pay/cash pay.
|
1412
|
-
# @param owner_of_next_action [CandidApiClient::Encounters::V4::Types::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as
|
1413
|
-
# defined by ownership of open Tasks.
|
1414
|
-
# @param patient_external_id [String] The patient ID from the external EMR platform for the patient
|
1415
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
1416
|
-
# @return [CandidApiClient::Encounters::V4::Types::EncounterPage]
|
1417
|
-
# @example
|
1418
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1419
|
-
# api.encounters.v_4.get_all(
|
1420
|
-
# limit: 100,
|
1421
|
-
# claim_status: BILLER_RECEIVED,
|
1422
|
-
# sort: CREATED_AT_ASC,
|
1423
|
-
# page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
|
1424
|
-
# date_of_service_min: DateTime.parse(2019-08-24),
|
1425
|
-
# date_of_service_max: DateTime.parse(2019-08-25),
|
1426
|
-
# primary_payer_names: "Medicare,Medicaid",
|
1427
|
-
# search_term: "doe",
|
1428
|
-
# external_id: "123456",
|
1429
|
-
# diagnoses_updated_since: DateTime.parse(2019-08-24T14:15:22.000Z)
|
1430
|
-
# )
|
1431
|
-
def get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil,
|
1432
|
-
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)
|
1433
|
-
Async do
|
1434
|
-
response = @request_client.conn.get do |req|
|
1435
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1436
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1437
|
-
req.headers = {
|
1438
|
-
**(req.headers || {}),
|
1439
|
-
**@request_client.get_headers,
|
1440
|
-
**(request_options&.additional_headers || {})
|
1441
|
-
}.compact
|
1442
|
-
req.params = {
|
1443
|
-
**(request_options&.additional_query_parameters || {}),
|
1444
|
-
"limit": limit,
|
1445
|
-
"claim_status": claim_status,
|
1446
|
-
"sort": sort,
|
1447
|
-
"page_token": page_token,
|
1448
|
-
"date_of_service_min": date_of_service_min,
|
1449
|
-
"date_of_service_max": date_of_service_max,
|
1450
|
-
"primary_payer_names": primary_payer_names,
|
1451
|
-
"search_term": search_term,
|
1452
|
-
"external_id": external_id,
|
1453
|
-
"diagnoses_updated_since": diagnoses_updated_since,
|
1454
|
-
"tag_ids": tag_ids,
|
1455
|
-
"work_queue_id": work_queue_id,
|
1456
|
-
"billable_status": billable_status,
|
1457
|
-
"responsible_party": responsible_party,
|
1458
|
-
"owner_of_next_action": owner_of_next_action,
|
1459
|
-
"patient_external_id": patient_external_id
|
1460
|
-
}.compact
|
1461
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
1462
|
-
request_options: request_options)}/api/encounters/v4"
|
1463
|
-
end
|
1464
|
-
CandidApiClient::Encounters::V4::Types::EncounterPage.from_json(json_object: response.body)
|
1465
|
-
end
|
1466
|
-
end
|
1467
|
-
|
1468
|
-
# @param encounter_id [String]
|
1469
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
1470
|
-
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
1471
|
-
# @example
|
1472
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1473
|
-
# api.encounters.v_4.get(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
1474
|
-
def get(encounter_id:, request_options: nil)
|
1475
|
-
Async do
|
1476
|
-
response = @request_client.conn.get do |req|
|
1477
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1478
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1479
|
-
req.headers = {
|
1480
|
-
**(req.headers || {}),
|
1481
|
-
**@request_client.get_headers,
|
1482
|
-
**(request_options&.additional_headers || {})
|
1483
|
-
}.compact
|
1484
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
1485
|
-
request_options: request_options)}/api/encounters/v4/#{encounter_id}"
|
1486
|
-
end
|
1487
|
-
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
1488
|
-
end
|
1489
|
-
end
|
1490
|
-
|
1491
|
-
# @param external_id [String] A client-specified unique ID to associate with this encounter;
|
1492
|
-
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
1493
|
-
# This field should not contain PHI.
|
1494
|
-
# @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
1495
|
-
# This date must be the local date in the timezone where the service occurred.
|
1496
|
-
# Box 24a on the CMS-1500 claim form.
|
1497
|
-
# If service occurred over a range of dates, this should be the start date.
|
1498
|
-
# date_of_service must be defined on either the encounter or the service lines but
|
1499
|
-
# not both.
|
1500
|
-
# If there are greater than zero service lines, it is recommended to specify
|
1501
|
-
# date_of_service on the service_line instead of on the encounter to prepare for
|
1502
|
-
# future API versions.
|
1503
|
-
# @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1504
|
-
# This date must be the local date in the timezone where the service occurred.
|
1505
|
-
# If omitted, the Encounter is assumed to be for a single day.
|
1506
|
-
# Must not be temporally before the date_of_service field.
|
1507
|
-
# If there are greater than zero service lines, it is recommended to specify
|
1508
|
-
# end_date_of_service on the service_line instead of on the encounter to prepare
|
1509
|
-
# for future API versions.
|
1510
|
-
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
1511
|
-
# for billing purpose.
|
1512
|
-
# Box 12 on the CMS-1500 claim form.
|
1513
|
-
# @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you,
|
1514
|
-
# not them. If false, patient may receive reimbursement.
|
1515
|
-
# Box 13 on the CMS-1500 claim form.
|
1516
|
-
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
|
1517
|
-
# to be made to you, not them.
|
1518
|
-
# Box 27 on the CMS-1500 claim form.
|
1519
|
-
# @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
1520
|
-
# Headaches").
|
1521
|
-
# @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
|
1522
|
-
# * :name (String)
|
1523
|
-
# * :rx_cui (String)
|
1524
|
-
# * :dosage (String)
|
1525
|
-
# * :dosage_form (String)
|
1526
|
-
# * :frequency (String)
|
1527
|
-
# * :as_needed (Boolean)
|
1528
|
-
# @param vitals [Hash] Request of type CandidApiClient::Encounters::V4::Types::Vitals, as a Hash
|
1529
|
-
# * :height_in (Integer)
|
1530
|
-
# * :weight_lbs (Integer)
|
1531
|
-
# * :blood_pressure_systolic_mmhg (Integer)
|
1532
|
-
# * :blood_pressure_diastolic_mmhg (Integer)
|
1533
|
-
# * :body_temperature_f (Float)
|
1534
|
-
# * :hemoglobin_gdl (Float)
|
1535
|
-
# * :hematocrit_pct (Float)
|
1536
|
-
# @param interventions [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Intervention>, as a Hash
|
1537
|
-
# * :name (String)
|
1538
|
-
# * :category (CandidApiClient::Encounters::V4::Types::InterventionCategory)
|
1539
|
-
# * :description (String)
|
1540
|
-
# * :medication (Hash)
|
1541
|
-
# * :name (String)
|
1542
|
-
# * :rx_cui (String)
|
1543
|
-
# * :dosage (String)
|
1544
|
-
# * :dosage_form (String)
|
1545
|
-
# * :frequency (String)
|
1546
|
-
# * :as_needed (Boolean)
|
1547
|
-
# * :labs (Array<CandidApiClient::Encounters::V4::Types::Lab>)
|
792
|
+
# Create an encounter from a pre-encounter patient and appointment. This endpoint
|
793
|
+
# is intended to be used by consumers who are managing
|
794
|
+
# patients and appointments in the pre-encounter service and is currently under
|
795
|
+
# development. Consumers who are not taking advantage
|
796
|
+
# of the pre-encounter service should use the standard create endpoint.
|
797
|
+
# The endpoint will create an encounter from the provided fields, pulling
|
798
|
+
# information from the provided patient and appointment objects
|
799
|
+
# where applicable. In particular, the following fields are populated from the
|
800
|
+
# patient and appointment objects:
|
801
|
+
# - Patient
|
802
|
+
# - Referring Provider
|
803
|
+
# - Subscriber Primary
|
804
|
+
# - Subscriber Secondary
|
805
|
+
# - Referral Number
|
806
|
+
# - Responsible Party
|
807
|
+
# - Guarantor
|
808
|
+
# Utilizing this endpoint opts you into automatic updating of the encounter when
|
809
|
+
# the patient or appointment is updated, assuming the
|
810
|
+
# encounter has not already been submitted or adjudicated.
|
811
|
+
#
|
812
|
+
# @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreateFromPreEncounter, as a Hash
|
813
|
+
# * :pre_encounter_patient_id (String)
|
814
|
+
# * :pre_encounter_appointment_ids (Array<String>)
|
815
|
+
# * :billing_provider (Hash)
|
816
|
+
# * :address (Hash)
|
817
|
+
# * :zip_plus_four_code (String)
|
818
|
+
# * :address_1 (String)
|
819
|
+
# * :address_2 (String)
|
820
|
+
# * :city (String)
|
821
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
822
|
+
# * :zip_code (String)
|
823
|
+
# * :tax_id (String)
|
824
|
+
# * :npi (String)
|
825
|
+
# * :taxonomy_code (String)
|
826
|
+
# * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
|
827
|
+
# * :first_name (String)
|
828
|
+
# * :last_name (String)
|
829
|
+
# * :organization_name (String)
|
830
|
+
# * :rendering_provider (Hash)
|
831
|
+
# * :npi (String)
|
832
|
+
# * :taxonomy_code (String)
|
833
|
+
# * :address (Hash)
|
834
|
+
# * :zip_plus_four_code (String)
|
835
|
+
# * :address_1 (String)
|
836
|
+
# * :address_2 (String)
|
837
|
+
# * :city (String)
|
838
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
839
|
+
# * :zip_code (String)
|
840
|
+
# * :first_name (String)
|
841
|
+
# * :last_name (String)
|
842
|
+
# * :organization_name (String)
|
843
|
+
# * :initial_referring_provider (Hash)
|
844
|
+
# * :npi (String)
|
845
|
+
# * :taxonomy_code (String)
|
846
|
+
# * :address (Hash)
|
847
|
+
# * :zip_plus_four_code (String)
|
848
|
+
# * :address_1 (String)
|
849
|
+
# * :address_2 (String)
|
850
|
+
# * :city (String)
|
851
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
852
|
+
# * :zip_code (String)
|
853
|
+
# * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
|
854
|
+
# * :first_name (String)
|
855
|
+
# * :last_name (String)
|
856
|
+
# * :organization_name (String)
|
857
|
+
# * :supervising_provider (Hash)
|
858
|
+
# * :npi (String)
|
859
|
+
# * :taxonomy_code (String)
|
860
|
+
# * :address (Hash)
|
861
|
+
# * :zip_plus_four_code (String)
|
862
|
+
# * :address_1 (String)
|
863
|
+
# * :address_2 (String)
|
864
|
+
# * :city (String)
|
865
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
866
|
+
# * :zip_code (String)
|
867
|
+
# * :first_name (String)
|
868
|
+
# * :last_name (String)
|
869
|
+
# * :organization_name (String)
|
870
|
+
# * :service_facility (Hash)
|
871
|
+
# * :organization_name (String)
|
872
|
+
# * :npi (String)
|
873
|
+
# * :address (Hash)
|
874
|
+
# * :zip_plus_four_code (String)
|
875
|
+
# * :address_1 (String)
|
876
|
+
# * :address_2 (String)
|
877
|
+
# * :city (String)
|
878
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
879
|
+
# * :zip_code (String)
|
880
|
+
# * :secondary_identification (String)
|
881
|
+
# * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
|
882
|
+
# * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
|
883
|
+
# * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
|
884
|
+
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
885
|
+
# * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
|
886
|
+
# * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
|
887
|
+
# * :external_claim_submission (Hash)
|
888
|
+
# * :claim_created_at (DateTime)
|
889
|
+
# * :patient_control_number (String)
|
890
|
+
# * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
|
891
|
+
# * :tag_ids (Array<String>)
|
892
|
+
# * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
|
893
|
+
# * :external_id (String)
|
894
|
+
# * :date_of_service (Date)
|
895
|
+
# * :end_date_of_service (Date)
|
896
|
+
# * :patient_authorized_release (Boolean)
|
897
|
+
# * :benefits_assigned_to_provider (Boolean)
|
898
|
+
# * :provider_accepts_assignment (Boolean)
|
899
|
+
# * :appointment_type (String)
|
900
|
+
# * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
|
901
|
+
# * :vitals (Hash)
|
902
|
+
# * :height_in (Integer)
|
903
|
+
# * :weight_lbs (Integer)
|
904
|
+
# * :blood_pressure_systolic_mmhg (Integer)
|
905
|
+
# * :blood_pressure_diastolic_mmhg (Integer)
|
906
|
+
# * :body_temperature_f (Float)
|
907
|
+
# * :hemoglobin_gdl (Float)
|
908
|
+
# * :hematocrit_pct (Float)
|
909
|
+
# * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
|
910
|
+
# * :pay_to_address (Hash)
|
911
|
+
# * :zip_plus_four_code (String)
|
912
|
+
# * :address_1 (String)
|
913
|
+
# * :address_2 (String)
|
914
|
+
# * :city (String)
|
915
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
916
|
+
# * :zip_code (String)
|
917
|
+
# * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
|
918
|
+
# * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
|
919
|
+
# * :additional_information (String)
|
920
|
+
# * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
|
921
|
+
# * :admission_date (Date)
|
922
|
+
# * :discharge_date (Date)
|
923
|
+
# * :onset_of_current_illness_or_symptom_date (Date)
|
924
|
+
# * :last_menstrual_period_date (Date)
|
925
|
+
# * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
|
926
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
927
|
+
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
928
|
+
# @example
|
929
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
930
|
+
# api.encounters.v_4.create_from_pre_encounter_patient_internal(request: { pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], 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", provider_commercial_license_type: LICENSED_CLINICAL_SOCIAL_WORKER, first_name: "string", last_name: "string", organization_name: "string" }, rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" }, 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" }, 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" }, 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" }, secondary_identification: "string" }, diagnoses: [{ name: "string", code_type: ABF, code: "string" }], clinical_notes: [{ category: CLINICAL, notes: }], billing_notes: [{ text: "string" }], place_of_service_code: PHARMACY, 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" }] }] }] }], service_lines: [{ procedure_code: "string", quantity: "string", units: MJ, diagnosis_pointers: }], 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 }] }, tag_ids: ["string"], schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }], external_id: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, appointment_type: "string", existing_medications: [{ name: "Lisinopril", rx_cui: "860975", dosage: "10mg", dosage_form: "Tablet", frequency: "Once Daily", as_needed: true }], 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 }, interventions: [{ name: "Physical Therapy Session", category: LIFESTYLE, description: "A session focused on improving muscular strength, flexibility, and range of motion post-injury.", medication: { name: "Lisinopril", rx_cui: "860975", dosage: "10mg", dosage_form: "Tablet", frequency: "Once Daily", as_needed: true }, labs: [{ name: "Genetic Health Labs", code: "GH12345", code_type: QUEST }] }], 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" }, synchronicity: SYNCHRONOUS, billable_status: BILLABLE, additional_information: "string", service_authorization_exception_code: C_1, admission_date: DateTime.parse(2023-01-15), discharge_date: DateTime.parse(2023-01-15), onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15), last_menstrual_period_date: DateTime.parse(2023-01-15), delay_reason_code: C_1 })
|
931
|
+
def create_from_pre_encounter_patient_internal(request:, request_options: nil)
|
932
|
+
response = @request_client.conn.post do |req|
|
933
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
934
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
935
|
+
req.headers = {
|
936
|
+
**(req.headers || {}),
|
937
|
+
**@request_client.get_headers,
|
938
|
+
**(request_options&.additional_headers || {})
|
939
|
+
}.compact
|
940
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
941
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
942
|
+
request_options: request_options)}/api/encounters/v4/create-from-pre-encounter-internal"
|
943
|
+
end
|
944
|
+
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
945
|
+
end
|
946
|
+
|
947
|
+
# @param encounter_id [String]
|
948
|
+
# @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you, not
|
949
|
+
# them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim
|
950
|
+
# form.
|
951
|
+
# @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
|
952
|
+
# @param external_id [String] A client-specified unique ID to associate with this encounter;
|
953
|
+
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
954
|
+
# This field should not contain PHI.
|
955
|
+
# @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
956
|
+
# This date must be the local date in the timezone where the service occurred.
|
957
|
+
# Box 24a on the CMS-1500 claim form.
|
958
|
+
# If service occurred over a range of dates, this should be the start date.
|
959
|
+
# If service lines have distinct date_of_service values, updating the encounter's
|
960
|
+
# date_of_service will fail. If all service line date_of_service values are the
|
961
|
+
# same, updating the encounter's date_of_service will update all service line
|
962
|
+
# date_of_service values.
|
963
|
+
# @param tag_ids [Array<String>] Names of tags that should be on the encounter. Note all tags on encounter will
|
964
|
+
# be overridden with this list.
|
965
|
+
# @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
|
966
|
+
# patient encounters.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
|
967
|
+
# * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
|
968
|
+
# * :notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNote>)
|
1548
969
|
# @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
|
1549
970
|
# * :zip_plus_four_code (String)
|
1550
971
|
# * :address_1 (String)
|
@@ -1552,17 +973,84 @@ module CandidApiClient
|
|
1552
973
|
# * :city (String)
|
1553
974
|
# * :state (CandidApiClient::Commons::Types::State)
|
1554
975
|
# * :zip_code (String)
|
1555
|
-
# @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
|
1556
|
-
# Asynchronous encounters occur when providers and patients communicate online
|
1557
|
-
# using
|
1558
|
-
# forms, instant messaging, or other pre-recorded digital mediums.
|
1559
|
-
# Synchronous encounters occur in live, real-time settings where the patient
|
1560
|
-
# interacts
|
1561
|
-
# directly with the provider, such as over video or a phone call.
|
1562
976
|
# @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
|
1563
|
-
# Examples for when this should be set to NOT_BILLABLE include
|
1564
|
-
#
|
1565
|
-
#
|
977
|
+
# Examples for when this should be set to NOT_BILLABLE include if the Encounter
|
978
|
+
# has not occurred yet or if there is no intention of ever billing the
|
979
|
+
# responsible_party.
|
980
|
+
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
|
981
|
+
# SELF_PAY if you intend to bill self pay/cash pay.
|
982
|
+
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments to
|
983
|
+
# be made to you, not them. Box 27 on the CMS-1500 claim form.
|
984
|
+
# @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter. Asynchronous
|
985
|
+
# encounters occur when providers and patients communicate online using forms,
|
986
|
+
# instant messaging, or other pre-recorded digital mediums. Synchronous encounters
|
987
|
+
# occur in live, real-time settings where the patient interacts directly with the
|
988
|
+
# provider, such as over video or a phone call.
|
989
|
+
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
|
990
|
+
# telemedicine, 11 for in-person. Full list
|
991
|
+
# //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
992
|
+
# @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
993
|
+
# Headaches").
|
994
|
+
# @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
995
|
+
# This date must be the local date in the timezone where the service occurred.
|
996
|
+
# If omitted, the Encounter is assumed to be for a single day.
|
997
|
+
# Must not be temporally before the date_of_service field.
|
998
|
+
# If service lines have distinct end_date_of_service values, updating the
|
999
|
+
# encounter's end_date_of_service will fail. If all service line
|
1000
|
+
# end_date_of_service values are the same, updating the encounter's
|
1001
|
+
# end_date_of_service will update all service line date_of_service values.
|
1002
|
+
# @param subscriber_primary [Hash] Contains details of the primary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
1003
|
+
# * :insurance_card (Hash)
|
1004
|
+
# * :member_id (String)
|
1005
|
+
# * :payer_name (String)
|
1006
|
+
# * :payer_id (String)
|
1007
|
+
# * :rx_bin (String)
|
1008
|
+
# * :rx_pcn (String)
|
1009
|
+
# * :image_url_front (String)
|
1010
|
+
# * :image_url_back (String)
|
1011
|
+
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1012
|
+
# * :group_number (String)
|
1013
|
+
# * :plan_name (String)
|
1014
|
+
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1015
|
+
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1016
|
+
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1017
|
+
# * :date_of_birth (Date)
|
1018
|
+
# * :address (Hash)
|
1019
|
+
# * :zip_plus_four_code (String)
|
1020
|
+
# * :address_1 (String)
|
1021
|
+
# * :address_2 (String)
|
1022
|
+
# * :city (String)
|
1023
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1024
|
+
# * :zip_code (String)
|
1025
|
+
# * :first_name (String)
|
1026
|
+
# * :last_name (String)
|
1027
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1028
|
+
# @param subscriber_secondary [Hash] Contains details of the secondary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
1029
|
+
# * :insurance_card (Hash)
|
1030
|
+
# * :member_id (String)
|
1031
|
+
# * :payer_name (String)
|
1032
|
+
# * :payer_id (String)
|
1033
|
+
# * :rx_bin (String)
|
1034
|
+
# * :rx_pcn (String)
|
1035
|
+
# * :image_url_front (String)
|
1036
|
+
# * :image_url_back (String)
|
1037
|
+
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1038
|
+
# * :group_number (String)
|
1039
|
+
# * :plan_name (String)
|
1040
|
+
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1041
|
+
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1042
|
+
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1043
|
+
# * :date_of_birth (Date)
|
1044
|
+
# * :address (Hash)
|
1045
|
+
# * :zip_plus_four_code (String)
|
1046
|
+
# * :address_1 (String)
|
1047
|
+
# * :address_2 (String)
|
1048
|
+
# * :city (String)
|
1049
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1050
|
+
# * :zip_code (String)
|
1051
|
+
# * :first_name (String)
|
1052
|
+
# * :last_name (String)
|
1053
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1566
1054
|
# @param additional_information [String] Defines additional information on the claim needed by the payer.
|
1567
1055
|
# Box 19 on the CMS-1500 claim form.
|
1568
1056
|
# @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
|
@@ -1587,40 +1075,16 @@ module CandidApiClient
|
|
1587
1075
|
# This date is the onset of acute symptoms for the current illness or condition.
|
1588
1076
|
# @param last_menstrual_period_date [Date] 837p Loop2300 DTP\*484, CMS-1500 Box 14
|
1589
1077
|
# Required when, in the judgment of the provider, the services on this claim are
|
1590
|
-
# related to the patient's pregnancy.
|
1078
|
+
# related to the patient's pregnancy.de
|
1591
1079
|
# @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
|
1592
1080
|
# Code indicating the reason why a request was delayed
|
1593
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
1594
|
-
# @param _field_set [Object]
|
1595
1081
|
# @param patient [Hash] Contains the identification information of the individual receiving medical
|
1596
|
-
# services.Request of type CandidApiClient::Individual::Types::
|
1597
|
-
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1598
|
-
# * :phone_consent (Boolean)
|
1599
|
-
# * :email (String)
|
1600
|
-
# * :non_insurance_payers (Array<String>)
|
1601
|
-
# * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
|
1602
|
-
# * :email_consent (Boolean)
|
1603
|
-
# * :external_id (String)
|
1604
|
-
# * :date_of_birth (Date)
|
1605
|
-
# * :address (Hash)
|
1606
|
-
# * :zip_plus_four_code (String)
|
1607
|
-
# * :address_1 (String)
|
1608
|
-
# * :address_2 (String)
|
1609
|
-
# * :city (String)
|
1610
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1611
|
-
# * :zip_code (String)
|
1082
|
+
# services.Request of type CandidApiClient::Individual::Types::PatientUpdate, as a Hash
|
1612
1083
|
# * :first_name (String)
|
1613
1084
|
# * :last_name (String)
|
1614
1085
|
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1615
|
-
#
|
1616
|
-
#
|
1617
|
-
# rendering provider. From a payer's perspective, this represents the person or
|
1618
|
-
# entity being reimbursed. When a contract exists with the target payer, the
|
1619
|
-
# billing provider should be the entity contracted with the payer. In some
|
1620
|
-
# circumstances, this will be an individual provider. In that case, submit that
|
1621
|
-
# provider's NPI and the tax ID (TIN) that the provider gave to the payer during
|
1622
|
-
# contracting. In other cases, the billing entity will be a medical group. If so,
|
1623
|
-
# 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
|
1086
|
+
# * :external_id (String)
|
1087
|
+
# * :date_of_birth (Date)
|
1624
1088
|
# * :address (Hash)
|
1625
1089
|
# * :zip_plus_four_code (String)
|
1626
1090
|
# * :address_1 (String)
|
@@ -1628,18 +1092,48 @@ module CandidApiClient
|
|
1628
1092
|
# * :city (String)
|
1629
1093
|
# * :state (CandidApiClient::Commons::Types::State)
|
1630
1094
|
# * :zip_code (String)
|
1631
|
-
# * :
|
1632
|
-
# * :
|
1633
|
-
# * :
|
1634
|
-
# * :
|
1635
|
-
# * :
|
1636
|
-
# * :
|
1637
|
-
#
|
1095
|
+
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1096
|
+
# * :phone_consent (Boolean)
|
1097
|
+
# * :email (String)
|
1098
|
+
# * :email_consent (Boolean)
|
1099
|
+
# * :non_insurance_payers (Array<String>)
|
1100
|
+
# * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
|
1101
|
+
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
1102
|
+
# for billing purpose.
|
1103
|
+
# Box 12 on the CMS-1500 claim form.
|
1104
|
+
# @param schema_instances [Array<Hash>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
|
1105
|
+
# Multiple schema
|
1106
|
+
# instances cannot be created for the same schema on an encounter. Updating schema
|
1107
|
+
# instances utilizes PUT
|
1108
|
+
# semantics, so the schema instances on the encounter will be set to whatever
|
1109
|
+
# inputs are provided. If null
|
1110
|
+
# 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
|
1111
|
+
# * :schema_id (String)
|
1112
|
+
# * :content (Hash{String => Object})
|
1113
|
+
# @param vitals [Hash] If a vitals entity already exists for the encounter, then all values will be
|
1114
|
+
# updated to the provided values.
|
1115
|
+
# Otherwise, a new vitals object will be created for the encounter.Request of type CandidApiClient::Encounters::V4::Types::VitalsUpdate, as a Hash
|
1116
|
+
# * :height_in (Integer)
|
1117
|
+
# * :weight_lbs (Integer)
|
1118
|
+
# * :blood_pressure_systolic_mmhg (Integer)
|
1119
|
+
# * :blood_pressure_diastolic_mmhg (Integer)
|
1120
|
+
# * :body_temperature_f (Float)
|
1121
|
+
# * :hemoglobin_gdl (Float)
|
1122
|
+
# * :hematocrit_pct (Float)
|
1123
|
+
# @param existing_medications [Array<Hash>] Existing medications that should be on the encounter.
|
1124
|
+
# Note all current existing medications on encounter will be overridden with this
|
1125
|
+
# list.Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
|
1126
|
+
# * :name (String)
|
1127
|
+
# * :rx_cui (String)
|
1128
|
+
# * :dosage (String)
|
1129
|
+
# * :dosage_form (String)
|
1130
|
+
# * :frequency (String)
|
1131
|
+
# * :as_needed (Boolean)
|
1638
1132
|
# @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
|
1639
1133
|
# etc. -- performing the service.
|
1640
1134
|
# For telehealth services, the rendering provider performs the visit, asynchronous
|
1641
1135
|
# communication, or other service. The rendering provider address should generally
|
1642
|
-
# be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::
|
1136
|
+
# be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProviderUpdate, as a Hash
|
1643
1137
|
# * :npi (String)
|
1644
1138
|
# * :taxonomy_code (String)
|
1645
1139
|
# * :address (Hash)
|
@@ -1652,11 +1146,17 @@ module CandidApiClient
|
|
1652
1146
|
# * :first_name (String)
|
1653
1147
|
# * :last_name (String)
|
1654
1148
|
# * :organization_name (String)
|
1655
|
-
# @param
|
1656
|
-
#
|
1657
|
-
#
|
1149
|
+
# @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
|
1150
|
+
# rendered, such as a provider office or hospital. For telehealth, service
|
1151
|
+
# facility can represent the provider's location when the service was delivered
|
1152
|
+
# (e.g., home), or the location where an in-person visit would have taken place,
|
1153
|
+
# whichever is easier to identify. If the provider is in-network, service facility
|
1154
|
+
# may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
|
1155
|
+
# for an in-network claim to be successfully adjudicated, the service facility
|
1156
|
+
# address listed on claims must match what was provided to the payer during the
|
1157
|
+
# credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate, as a Hash
|
1158
|
+
# * :organization_name (String)
|
1658
1159
|
# * :npi (String)
|
1659
|
-
# * :taxonomy_code (String)
|
1660
1160
|
# * :address (Hash)
|
1661
1161
|
# * :zip_plus_four_code (String)
|
1662
1162
|
# * :address_1 (String)
|
@@ -1664,16 +1164,32 @@ module CandidApiClient
|
|
1664
1164
|
# * :city (String)
|
1665
1165
|
# * :state (CandidApiClient::Commons::Types::State)
|
1666
1166
|
# * :zip_code (String)
|
1167
|
+
# * :secondary_identification (String)
|
1168
|
+
# @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorUpdate, as a Hash
|
1667
1169
|
# * :first_name (String)
|
1668
1170
|
# * :last_name (String)
|
1669
|
-
# * :
|
1670
|
-
#
|
1671
|
-
#
|
1672
|
-
#
|
1673
|
-
#
|
1674
|
-
#
|
1675
|
-
#
|
1676
|
-
#
|
1171
|
+
# * :external_id (String)
|
1172
|
+
# * :date_of_birth (Date)
|
1173
|
+
# * :address (Hash)
|
1174
|
+
# * :zip_plus_four_code (String)
|
1175
|
+
# * :address_1 (String)
|
1176
|
+
# * :address_2 (String)
|
1177
|
+
# * :city (String)
|
1178
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1179
|
+
# * :zip_code (String)
|
1180
|
+
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1181
|
+
# * :phone_consent (Boolean)
|
1182
|
+
# * :email (String)
|
1183
|
+
# * :email_consent (Boolean)
|
1184
|
+
# @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
|
1185
|
+
# Billing provider may be, but is not necessarily, the same person/NPI as the
|
1186
|
+
# rendering provider. From a payer's perspective, this represents the person or
|
1187
|
+
# entity being reimbursed. When a contract exists with the target payer, the
|
1188
|
+
# billing provider should be the entity contracted with the payer. In some
|
1189
|
+
# circumstances, this will be an individual provider. In that case, submit that
|
1190
|
+
# provider's NPI and the tax ID (TIN) that the provider gave to the payer during
|
1191
|
+
# contracting. In other cases, the billing entity will be a medical group. If so,
|
1192
|
+
# 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::BillingProviderUpdate, as a Hash
|
1677
1193
|
# * :address (Hash)
|
1678
1194
|
# * :zip_plus_four_code (String)
|
1679
1195
|
# * :address_1 (String)
|
@@ -1681,12 +1197,15 @@ module CandidApiClient
|
|
1681
1197
|
# * :city (String)
|
1682
1198
|
# * :state (CandidApiClient::Commons::Types::State)
|
1683
1199
|
# * :zip_code (String)
|
1684
|
-
# * :
|
1200
|
+
# * :tax_id (String)
|
1201
|
+
# * :npi (String)
|
1202
|
+
# * :taxonomy_code (String)
|
1203
|
+
# * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
|
1685
1204
|
# * :first_name (String)
|
1686
1205
|
# * :last_name (String)
|
1687
1206
|
# * :organization_name (String)
|
1688
1207
|
# @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
|
1689
|
-
# required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::
|
1208
|
+
# required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash
|
1690
1209
|
# * :npi (String)
|
1691
1210
|
# * :taxonomy_code (String)
|
1692
1211
|
# * :address (Hash)
|
@@ -1699,48 +1218,11 @@ module CandidApiClient
|
|
1699
1218
|
# * :first_name (String)
|
1700
1219
|
# * :last_name (String)
|
1701
1220
|
# * :organization_name (String)
|
1702
|
-
# @param
|
1703
|
-
#
|
1704
|
-
#
|
1705
|
-
# (e.g., home), or the location where an in-person visit would have taken place,
|
1706
|
-
# whichever is easier to identify. If the provider is in-network, service facility
|
1707
|
-
# may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
|
1708
|
-
# for an in-network claim to be successfully adjudicated, the service facility
|
1709
|
-
# address listed on claims must match what was provided to the payer during the
|
1710
|
-
# credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase, as a Hash
|
1711
|
-
# * :organization_name (String)
|
1221
|
+
# @param referring_provider [Hash] The final provider who referred the services that were rendered.
|
1222
|
+
# All physicians who order services or refer Medicare beneficiaries must
|
1223
|
+
# report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate, as a Hash
|
1712
1224
|
# * :npi (String)
|
1713
|
-
# * :
|
1714
|
-
# * :zip_plus_four_code (String)
|
1715
|
-
# * :address_1 (String)
|
1716
|
-
# * :address_2 (String)
|
1717
|
-
# * :city (String)
|
1718
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1719
|
-
# * :zip_code (String)
|
1720
|
-
# * :secondary_identification (String)
|
1721
|
-
# @param subscriber_primary [Hash] Subscriber_primary is required when responsible_party is INSURANCE_PAY (i.e.
|
1722
|
-
# when the claim should be billed to insurance).
|
1723
|
-
# These are not required fields when responsible_party is SELF_PAY (i.e. when the
|
1724
|
-
# claim should be billed to the patient).
|
1725
|
-
# However, if you collect this for patients, even self-pay, we recommend including
|
1726
|
-
# it when sending encounters to Candid.
|
1727
|
-
# Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party
|
1728
|
-
# to define self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
1729
|
-
# * :insurance_card (Hash)
|
1730
|
-
# * :member_id (String)
|
1731
|
-
# * :payer_name (String)
|
1732
|
-
# * :payer_id (String)
|
1733
|
-
# * :rx_bin (String)
|
1734
|
-
# * :rx_pcn (String)
|
1735
|
-
# * :image_url_front (String)
|
1736
|
-
# * :image_url_back (String)
|
1737
|
-
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1738
|
-
# * :group_number (String)
|
1739
|
-
# * :plan_name (String)
|
1740
|
-
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1741
|
-
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1742
|
-
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1743
|
-
# * :date_of_birth (Date)
|
1225
|
+
# * :taxonomy_code (String)
|
1744
1226
|
# * :address (Hash)
|
1745
1227
|
# * :zip_plus_four_code (String)
|
1746
1228
|
# * :address_1 (String)
|
@@ -1750,23 +1232,14 @@ module CandidApiClient
|
|
1750
1232
|
# * :zip_code (String)
|
1751
1233
|
# * :first_name (String)
|
1752
1234
|
# * :last_name (String)
|
1753
|
-
# * :
|
1754
|
-
# @param
|
1755
|
-
#
|
1756
|
-
#
|
1757
|
-
#
|
1758
|
-
#
|
1759
|
-
#
|
1760
|
-
#
|
1761
|
-
# * :image_url_front (String)
|
1762
|
-
# * :image_url_back (String)
|
1763
|
-
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1764
|
-
# * :group_number (String)
|
1765
|
-
# * :plan_name (String)
|
1766
|
-
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1767
|
-
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1768
|
-
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1769
|
-
# * :date_of_birth (Date)
|
1235
|
+
# * :organization_name (String)
|
1236
|
+
# @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
|
1237
|
+
# this loop to
|
1238
|
+
# indicate the initial referral from the primary care provider or whatever
|
1239
|
+
# provider wrote the initial referral for this patient's episode of care being
|
1240
|
+
# billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate, as a Hash
|
1241
|
+
# * :npi (String)
|
1242
|
+
# * :taxonomy_code (String)
|
1770
1243
|
# * :address (Hash)
|
1771
1244
|
# * :zip_plus_four_code (String)
|
1772
1245
|
# * :address_1 (String)
|
@@ -1774,130 +1247,151 @@ module CandidApiClient
|
|
1774
1247
|
# * :city (String)
|
1775
1248
|
# * :state (CandidApiClient::Commons::Types::State)
|
1776
1249
|
# * :zip_code (String)
|
1250
|
+
# * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
|
1777
1251
|
# * :first_name (String)
|
1778
1252
|
# * :last_name (String)
|
1779
|
-
# * :
|
1780
|
-
# @param
|
1781
|
-
# @param
|
1782
|
-
#
|
1253
|
+
# * :organization_name (String)
|
1254
|
+
# @param referral_number [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
|
1255
|
+
# @param epsdt_referral [Hash] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
|
1256
|
+
# 837P formRequest of type CandidApiClient::Encounters::V4::Types::EpsdtReferral, as a Hash
|
1257
|
+
# * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
1258
|
+
# * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
1259
|
+
# * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
1260
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
1261
|
+
# @param _field_set [Object]
|
1262
|
+
# @param diagnosis_ids [Array<String>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
1783
1263
|
# diagnoses
|
1784
1264
|
# may be submitted at this time, and coders will later prioritize the 12 that will
|
1785
1265
|
# be
|
1786
|
-
# submitted to the payor.
|
1787
|
-
#
|
1788
|
-
# * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
|
1789
|
-
# * :code (String)
|
1790
|
-
# @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
|
1791
|
-
# patient encounters.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
|
1792
|
-
# * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
|
1793
|
-
# * :notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNote>)
|
1794
|
-
# @param billing_notes [Array<Hash>] Spot to store misc, human-readable, notes about this encounter to be used
|
1795
|
-
# in the billing process.Request of type Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>, as a Hash
|
1796
|
-
# * :text (String)
|
1797
|
-
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
|
1266
|
+
# submitted to the payor.
|
1267
|
+
# @param place_of_service_code_as_submitted [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
|
1798
1268
|
# telemedicine, 11 for in-person. Full list
|
1799
1269
|
# //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
1800
|
-
# @param patient_histories [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>, as a Hash
|
1801
|
-
# * :category (CandidApiClient::Encounters::V4::Types::PatientHistoryCategoryEnum)
|
1802
|
-
# * :questions (Array<CandidApiClient::Encounters::V4::Types::IntakeQuestion>)
|
1803
|
-
# @param service_lines [Array<Hash>] Each service line must be linked to a diagnosis. Concretely,
|
1804
|
-
# `service_line.diagnosis_pointers`must contain at least one entry which should be
|
1805
|
-
# in bounds of the diagnoses list field.Request of type Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>, as a Hash
|
1806
|
-
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
1807
|
-
# * :procedure_code (String)
|
1808
|
-
# * :quantity (String)
|
1809
|
-
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
1810
|
-
# * :charge_amount_cents (Integer)
|
1811
|
-
# * :diagnosis_pointers (Array<Integer>)
|
1812
|
-
# * :drug_identification (Hash)
|
1813
|
-
# * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
|
1814
|
-
# * :national_drug_code (String)
|
1815
|
-
# * :national_drug_unit_count (String)
|
1816
|
-
# * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
|
1817
|
-
# * :link_sequence_number (String)
|
1818
|
-
# * :pharmacy_prescription_number (String)
|
1819
|
-
# * :conversion_formula (String)
|
1820
|
-
# * :drug_description (String)
|
1821
|
-
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
1822
|
-
# * :description (String)
|
1823
|
-
# * :date_of_service (Date)
|
1824
|
-
# * :end_date_of_service (Date)
|
1825
|
-
# * :ordering_provider (Hash)
|
1826
|
-
# * :npi (String)
|
1827
|
-
# * :taxonomy_code (String)
|
1828
|
-
# * :address (Hash)
|
1829
|
-
# * :zip_plus_four_code (String)
|
1830
|
-
# * :address_1 (String)
|
1831
|
-
# * :address_2 (String)
|
1832
|
-
# * :city (String)
|
1833
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1834
|
-
# * :zip_code (String)
|
1835
|
-
# * :first_name (String)
|
1836
|
-
# * :last_name (String)
|
1837
|
-
# * :organization_name (String)
|
1838
|
-
# * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
|
1839
|
-
# @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
|
1840
|
-
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1841
|
-
# * :phone_consent (Boolean)
|
1842
|
-
# * :email (String)
|
1843
|
-
# * :email_consent (Boolean)
|
1844
|
-
# * :first_name (String)
|
1845
|
-
# * :last_name (String)
|
1846
|
-
# * :external_id (String)
|
1847
|
-
# * :date_of_birth (Date)
|
1848
|
-
# * :address (Hash)
|
1849
|
-
# * :zip_plus_four_code (String)
|
1850
|
-
# * :address_1 (String)
|
1851
|
-
# * :address_2 (String)
|
1852
|
-
# * :city (String)
|
1853
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
1854
|
-
# * :zip_code (String)
|
1855
|
-
# @param external_claim_submission [Hash] ***This field is in beta.***
|
1856
|
-
# To be included for claims that have been submitted outside of Candid.
|
1857
|
-
# Candid supports posting remits and payments to these claims and working them
|
1858
|
-
# in-platform (e.g. editing, resubmitting).Request of type CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate, as a Hash
|
1859
|
-
# * :claim_created_at (DateTime)
|
1860
|
-
# * :patient_control_number (String)
|
1861
|
-
# * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
|
1862
|
-
# @param tag_ids [Array<String>] Names of tags that should be on the encounter.
|
1863
|
-
# @param schema_instances [Array<Hash>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
|
1864
|
-
# Multiple schema
|
1865
|
-
# instances cannot be created for the same schema on an encounter.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
|
1866
|
-
# * :schema_id (String)
|
1867
|
-
# * :content (Hash{String => Object})
|
1868
|
-
# @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
|
1869
1270
|
# @param request_options [CandidApiClient::RequestOptions]
|
1870
|
-
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
1271
|
+
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
1272
|
+
# @example
|
1273
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1274
|
+
# api.encounters.v_4.update(
|
1275
|
+
# encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
1276
|
+
# diagnosis_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"],
|
1277
|
+
# place_of_service_code_as_submitted: PHARMACY
|
1278
|
+
# )
|
1279
|
+
def update(encounter_id:, benefits_assigned_to_provider: nil, prior_authorization_number: nil,
|
1280
|
+
external_id: nil, date_of_service: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, billing_provider: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, referral_number: nil, epsdt_referral: nil, additional_properties: nil, _field_set: nil, diagnosis_ids: nil, place_of_service_code_as_submitted: nil, request_options: nil)
|
1281
|
+
response = @request_client.conn.patch do |req|
|
1282
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1283
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1284
|
+
req.headers = {
|
1285
|
+
**(req.headers || {}),
|
1286
|
+
**@request_client.get_headers,
|
1287
|
+
**(request_options&.additional_headers || {})
|
1288
|
+
}.compact
|
1289
|
+
req.body = {
|
1290
|
+
**(request_options&.additional_body_parameters || {}),
|
1291
|
+
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
1292
|
+
prior_authorization_number: prior_authorization_number,
|
1293
|
+
external_id: external_id,
|
1294
|
+
date_of_service: date_of_service,
|
1295
|
+
tag_ids: tag_ids,
|
1296
|
+
clinical_notes: clinical_notes,
|
1297
|
+
pay_to_address: pay_to_address,
|
1298
|
+
billable_status: billable_status,
|
1299
|
+
responsible_party: responsible_party,
|
1300
|
+
provider_accepts_assignment: provider_accepts_assignment,
|
1301
|
+
synchronicity: synchronicity,
|
1302
|
+
place_of_service_code: place_of_service_code,
|
1303
|
+
appointment_type: appointment_type,
|
1304
|
+
end_date_of_service: end_date_of_service,
|
1305
|
+
subscriber_primary: subscriber_primary,
|
1306
|
+
subscriber_secondary: subscriber_secondary,
|
1307
|
+
additional_information: additional_information,
|
1308
|
+
service_authorization_exception_code: service_authorization_exception_code,
|
1309
|
+
admission_date: admission_date,
|
1310
|
+
discharge_date: discharge_date,
|
1311
|
+
onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
|
1312
|
+
last_menstrual_period_date: last_menstrual_period_date,
|
1313
|
+
delay_reason_code: delay_reason_code,
|
1314
|
+
patient: patient,
|
1315
|
+
patient_authorized_release: patient_authorized_release,
|
1316
|
+
schema_instances: schema_instances,
|
1317
|
+
vitals: vitals,
|
1318
|
+
existing_medications: existing_medications,
|
1319
|
+
rendering_provider: rendering_provider,
|
1320
|
+
service_facility: service_facility,
|
1321
|
+
guarantor: guarantor,
|
1322
|
+
billing_provider: billing_provider,
|
1323
|
+
supervising_provider: supervising_provider,
|
1324
|
+
referring_provider: referring_provider,
|
1325
|
+
initial_referring_provider: initial_referring_provider,
|
1326
|
+
referral_number: referral_number,
|
1327
|
+
epsdt_referral: epsdt_referral,
|
1328
|
+
additional_properties: additional_properties,
|
1329
|
+
_field_set: _field_set,
|
1330
|
+
diagnosis_ids: diagnosis_ids,
|
1331
|
+
place_of_service_code_as_submitted: place_of_service_code_as_submitted
|
1332
|
+
}.compact
|
1333
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
1334
|
+
request_options: request_options)}/api/encounters/v4/#{encounter_id}"
|
1335
|
+
end
|
1336
|
+
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
1337
|
+
end
|
1338
|
+
end
|
1339
|
+
|
1340
|
+
class AsyncV4Client
|
1341
|
+
# @return [CandidApiClient::AsyncRequestClient]
|
1342
|
+
attr_reader :request_client
|
1343
|
+
|
1344
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
1345
|
+
# @return [CandidApiClient::Encounters::V4::AsyncV4Client]
|
1346
|
+
def initialize(request_client:)
|
1347
|
+
@request_client = request_client
|
1348
|
+
end
|
1349
|
+
|
1350
|
+
# @param limit [Integer] Maximum number of entities per page, defaults to 100.
|
1351
|
+
# @param claim_status [CandidApiClient::Claims::Types::ClaimStatus] Indicates the current status of an insurance claim within the billing process.
|
1352
|
+
# @param sort [CandidApiClient::Encounters::V4::Types::EncounterSortOptions] Defaults to created_at:desc.
|
1353
|
+
# @param page_token [String]
|
1354
|
+
# @param date_of_service_min [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1355
|
+
# @param date_of_service_max [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
1356
|
+
# @param primary_payer_names [String] Comma delimited string.
|
1357
|
+
# @param search_term [String] Filter by any of the following fields: encounter_id, claim_id, patient
|
1358
|
+
# external_id,
|
1359
|
+
# patient date of birth, patient first name, patient last name,
|
1360
|
+
# or encounter external id.
|
1361
|
+
# @param external_id [String] Filter to an exact match on encounter external_id, if one exists.
|
1362
|
+
# @param diagnoses_updated_since [DateTime] ISO 8601 timestamp; ideally in UTC (although not required):
|
1363
|
+
# 2019-08-24T14:15:22Z.
|
1364
|
+
# @param tag_ids [String] Filter by name of tags on encounters.
|
1365
|
+
# @param work_queue_id [String]
|
1366
|
+
# @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
|
1367
|
+
# Examples for when this should be set to NOT_BILLABLE include if the Encounter
|
1368
|
+
# has not occurred yet or if there is no intention of ever billing the
|
1369
|
+
# responsible_party.
|
1370
|
+
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
|
1371
|
+
# SELF_PAY if you intend to bill self pay/cash pay.
|
1372
|
+
# @param owner_of_next_action [CandidApiClient::Encounters::V4::Types::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as
|
1373
|
+
# defined by ownership of open Tasks.
|
1374
|
+
# @param patient_external_id [String] The patient ID from the external EMR platform for the patient
|
1375
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
1376
|
+
# @return [CandidApiClient::Encounters::V4::Types::EncounterPage]
|
1871
1377
|
# @example
|
1872
1378
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1873
|
-
# api.encounters.v_4.
|
1874
|
-
#
|
1875
|
-
#
|
1876
|
-
#
|
1877
|
-
#
|
1878
|
-
#
|
1879
|
-
#
|
1880
|
-
#
|
1881
|
-
#
|
1882
|
-
#
|
1883
|
-
#
|
1884
|
-
# responsible_party: INSURANCE_PAY,
|
1885
|
-
# diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
|
1886
|
-
# clinical_notes: [{ category: CLINICAL, notes: [{ text: "string", author_name: "string", author_npi: "string", timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }] }],
|
1887
|
-
# billing_notes: [{ text: "string" }],
|
1888
|
-
# place_of_service_code: PHARMACY,
|
1889
|
-
# 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" }] }] }] }],
|
1890
|
-
# 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", drug_description: "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" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }] }],
|
1891
|
-
# 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" } },
|
1892
|
-
# 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 }] },
|
1893
|
-
# tag_ids: ["string"],
|
1894
|
-
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
|
1895
|
-
# referral_number: "string"
|
1379
|
+
# api.encounters.v_4.get_all(
|
1380
|
+
# limit: 100,
|
1381
|
+
# claim_status: BILLER_RECEIVED,
|
1382
|
+
# sort: CREATED_AT_ASC,
|
1383
|
+
# page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
|
1384
|
+
# date_of_service_min: DateTime.parse(2019-08-24),
|
1385
|
+
# date_of_service_max: DateTime.parse(2019-08-25),
|
1386
|
+
# primary_payer_names: "Medicare,Medicaid",
|
1387
|
+
# search_term: "doe",
|
1388
|
+
# external_id: "123456",
|
1389
|
+
# diagnoses_updated_since: DateTime.parse(2019-08-24T14:15:22.000Z)
|
1896
1390
|
# )
|
1897
|
-
def
|
1898
|
-
|
1391
|
+
def get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil,
|
1392
|
+
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)
|
1899
1393
|
Async do
|
1900
|
-
response = @request_client.conn.
|
1394
|
+
response = @request_client.conn.get do |req|
|
1901
1395
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1902
1396
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1903
1397
|
req.headers = {
|
@@ -1905,80 +1399,55 @@ module CandidApiClient
|
|
1905
1399
|
**@request_client.get_headers,
|
1906
1400
|
**(request_options&.additional_headers || {})
|
1907
1401
|
}.compact
|
1908
|
-
req.
|
1909
|
-
**(request_options&.
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1915
|
-
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
billable_status: billable_status,
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
discharge_date: discharge_date,
|
1927
|
-
onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
|
1928
|
-
last_menstrual_period_date: last_menstrual_period_date,
|
1929
|
-
delay_reason_code: delay_reason_code,
|
1930
|
-
additional_properties: additional_properties,
|
1931
|
-
_field_set: _field_set,
|
1932
|
-
patient: patient,
|
1933
|
-
billing_provider: billing_provider,
|
1934
|
-
rendering_provider: rendering_provider,
|
1935
|
-
referring_provider: referring_provider,
|
1936
|
-
initial_referring_provider: initial_referring_provider,
|
1937
|
-
supervising_provider: supervising_provider,
|
1938
|
-
service_facility: service_facility,
|
1939
|
-
subscriber_primary: subscriber_primary,
|
1940
|
-
subscriber_secondary: subscriber_secondary,
|
1941
|
-
prior_authorization_number: prior_authorization_number,
|
1942
|
-
responsible_party: responsible_party,
|
1943
|
-
diagnoses: diagnoses,
|
1944
|
-
clinical_notes: clinical_notes,
|
1945
|
-
billing_notes: billing_notes,
|
1946
|
-
place_of_service_code: place_of_service_code,
|
1947
|
-
patient_histories: patient_histories,
|
1948
|
-
service_lines: service_lines,
|
1949
|
-
guarantor: guarantor,
|
1950
|
-
external_claim_submission: external_claim_submission,
|
1951
|
-
tag_ids: tag_ids,
|
1952
|
-
schema_instances: schema_instances,
|
1953
|
-
referral_number: referral_number
|
1402
|
+
req.params = {
|
1403
|
+
**(request_options&.additional_query_parameters || {}),
|
1404
|
+
"limit": limit,
|
1405
|
+
"claim_status": claim_status,
|
1406
|
+
"sort": sort,
|
1407
|
+
"page_token": page_token,
|
1408
|
+
"date_of_service_min": date_of_service_min,
|
1409
|
+
"date_of_service_max": date_of_service_max,
|
1410
|
+
"primary_payer_names": primary_payer_names,
|
1411
|
+
"search_term": search_term,
|
1412
|
+
"external_id": external_id,
|
1413
|
+
"diagnoses_updated_since": diagnoses_updated_since,
|
1414
|
+
"tag_ids": tag_ids,
|
1415
|
+
"work_queue_id": work_queue_id,
|
1416
|
+
"billable_status": billable_status,
|
1417
|
+
"responsible_party": responsible_party,
|
1418
|
+
"owner_of_next_action": owner_of_next_action,
|
1419
|
+
"patient_external_id": patient_external_id
|
1954
1420
|
}.compact
|
1955
1421
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
1956
1422
|
request_options: request_options)}/api/encounters/v4"
|
1957
1423
|
end
|
1424
|
+
CandidApiClient::Encounters::V4::Types::EncounterPage.from_json(json_object: response.body)
|
1425
|
+
end
|
1426
|
+
end
|
1427
|
+
|
1428
|
+
# @param encounter_id [String]
|
1429
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
1430
|
+
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
1431
|
+
# @example
|
1432
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1433
|
+
# api.encounters.v_4.get(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
1434
|
+
def get(encounter_id:, request_options: nil)
|
1435
|
+
Async do
|
1436
|
+
response = @request_client.conn.get do |req|
|
1437
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1438
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1439
|
+
req.headers = {
|
1440
|
+
**(req.headers || {}),
|
1441
|
+
**@request_client.get_headers,
|
1442
|
+
**(request_options&.additional_headers || {})
|
1443
|
+
}.compact
|
1444
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
1445
|
+
request_options: request_options)}/api/encounters/v4/#{encounter_id}"
|
1446
|
+
end
|
1958
1447
|
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
1959
1448
|
end
|
1960
1449
|
end
|
1961
1450
|
|
1962
|
-
# Create an encounter from a pre-encounter patient and appointment. This endpoint
|
1963
|
-
# is intended to be used by consumers who are managing
|
1964
|
-
# patients and appointments in the pre-encounter service and is currently under
|
1965
|
-
# development. Consumers who are not taking advantage
|
1966
|
-
# of the pre-encounter service should use the standard create endpoint.
|
1967
|
-
# The endpoint will create an encounter from the provided fields, pulling
|
1968
|
-
# information from the provided patient and appointment objects
|
1969
|
-
# where applicable. In particular, the following fields are populated from the
|
1970
|
-
# patient and appointment objects:
|
1971
|
-
# - Patient
|
1972
|
-
# - Referring Provider
|
1973
|
-
# - Subscriber Primary
|
1974
|
-
# - Subscriber Secondary
|
1975
|
-
# - Referral Number
|
1976
|
-
# - Responsible Party
|
1977
|
-
# - Guarantor
|
1978
|
-
# Utilizing this endpoint opts you into automatic updating of the encounter when
|
1979
|
-
# the patient or appointment is updated, assuming the
|
1980
|
-
# encounter has not already been submitted or adjudicated.
|
1981
|
-
#
|
1982
1451
|
# @param external_id [String] A client-specified unique ID to associate with this encounter;
|
1983
1452
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
1984
1453
|
# This field should not contain PHI.
|
@@ -2083,8 +1552,26 @@ module CandidApiClient
|
|
2083
1552
|
# Code indicating the reason why a request was delayed
|
2084
1553
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
2085
1554
|
# @param _field_set [Object]
|
2086
|
-
# @param
|
2087
|
-
#
|
1555
|
+
# @param patient [Hash] Contains the identification information of the individual receiving medical
|
1556
|
+
# services.Request of type CandidApiClient::Individual::Types::PatientCreate, as a Hash
|
1557
|
+
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1558
|
+
# * :phone_consent (Boolean)
|
1559
|
+
# * :email (String)
|
1560
|
+
# * :non_insurance_payers (Array<String>)
|
1561
|
+
# * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
|
1562
|
+
# * :email_consent (Boolean)
|
1563
|
+
# * :external_id (String)
|
1564
|
+
# * :date_of_birth (Date)
|
1565
|
+
# * :address (Hash)
|
1566
|
+
# * :zip_plus_four_code (String)
|
1567
|
+
# * :address_1 (String)
|
1568
|
+
# * :address_2 (String)
|
1569
|
+
# * :city (String)
|
1570
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1571
|
+
# * :zip_code (String)
|
1572
|
+
# * :first_name (String)
|
1573
|
+
# * :last_name (String)
|
1574
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
2088
1575
|
# @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
|
2089
1576
|
# Billing provider may be, but is not necessarily, the same person/NPI as the
|
2090
1577
|
# rendering provider. From a payer's perspective, this represents the person or
|
@@ -2125,6 +1612,21 @@ module CandidApiClient
|
|
2125
1612
|
# * :first_name (String)
|
2126
1613
|
# * :last_name (String)
|
2127
1614
|
# * :organization_name (String)
|
1615
|
+
# @param referring_provider [Hash] The final provider who referred the services that were rendered.
|
1616
|
+
# All physicians who order services or refer Medicare beneficiaries must
|
1617
|
+
# report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProvider, as a Hash
|
1618
|
+
# * :npi (String)
|
1619
|
+
# * :taxonomy_code (String)
|
1620
|
+
# * :address (Hash)
|
1621
|
+
# * :zip_plus_four_code (String)
|
1622
|
+
# * :address_1 (String)
|
1623
|
+
# * :address_2 (String)
|
1624
|
+
# * :city (String)
|
1625
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1626
|
+
# * :zip_code (String)
|
1627
|
+
# * :first_name (String)
|
1628
|
+
# * :last_name (String)
|
1629
|
+
# * :organization_name (String)
|
2128
1630
|
# @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
|
2129
1631
|
# this loop to
|
2130
1632
|
# indicate the initial referral from the primary care provider or whatever
|
@@ -2176,6 +1678,67 @@ module CandidApiClient
|
|
2176
1678
|
# * :state (CandidApiClient::Commons::Types::State)
|
2177
1679
|
# * :zip_code (String)
|
2178
1680
|
# * :secondary_identification (String)
|
1681
|
+
# @param subscriber_primary [Hash] Subscriber_primary is required when responsible_party is INSURANCE_PAY (i.e.
|
1682
|
+
# when the claim should be billed to insurance).
|
1683
|
+
# These are not required fields when responsible_party is SELF_PAY (i.e. when the
|
1684
|
+
# claim should be billed to the patient).
|
1685
|
+
# However, if you collect this for patients, even self-pay, we recommend including
|
1686
|
+
# it when sending encounters to Candid.
|
1687
|
+
# Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party
|
1688
|
+
# to define self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
|
1689
|
+
# * :insurance_card (Hash)
|
1690
|
+
# * :member_id (String)
|
1691
|
+
# * :payer_name (String)
|
1692
|
+
# * :payer_id (String)
|
1693
|
+
# * :rx_bin (String)
|
1694
|
+
# * :rx_pcn (String)
|
1695
|
+
# * :image_url_front (String)
|
1696
|
+
# * :image_url_back (String)
|
1697
|
+
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1698
|
+
# * :group_number (String)
|
1699
|
+
# * :plan_name (String)
|
1700
|
+
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1701
|
+
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1702
|
+
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
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
|
+
# * :first_name (String)
|
1712
|
+
# * :last_name (String)
|
1713
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1714
|
+
# @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
|
1715
|
+
# * :insurance_card (Hash)
|
1716
|
+
# * :member_id (String)
|
1717
|
+
# * :payer_name (String)
|
1718
|
+
# * :payer_id (String)
|
1719
|
+
# * :rx_bin (String)
|
1720
|
+
# * :rx_pcn (String)
|
1721
|
+
# * :image_url_front (String)
|
1722
|
+
# * :image_url_back (String)
|
1723
|
+
# * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
|
1724
|
+
# * :group_number (String)
|
1725
|
+
# * :plan_name (String)
|
1726
|
+
# * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
|
1727
|
+
# * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
|
1728
|
+
# * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
|
1729
|
+
# * :date_of_birth (Date)
|
1730
|
+
# * :address (Hash)
|
1731
|
+
# * :zip_plus_four_code (String)
|
1732
|
+
# * :address_1 (String)
|
1733
|
+
# * :address_2 (String)
|
1734
|
+
# * :city (String)
|
1735
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1736
|
+
# * :zip_code (String)
|
1737
|
+
# * :first_name (String)
|
1738
|
+
# * :last_name (String)
|
1739
|
+
# * :gender (CandidApiClient::Individual::Types::Gender)
|
1740
|
+
# @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
|
1741
|
+
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
|
2179
1742
|
# @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
2180
1743
|
# diagnoses
|
2181
1744
|
# may be submitted at this time, and coders will later prioritize the 12 that will
|
@@ -2192,8 +1755,8 @@ module CandidApiClient
|
|
2192
1755
|
# in the billing process.Request of type Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>, as a Hash
|
2193
1756
|
# * :text (String)
|
2194
1757
|
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
|
2195
|
-
# telemedicine, 11 for in-person. Full list
|
2196
|
-
# .gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
1758
|
+
# telemedicine, 11 for in-person. Full list
|
1759
|
+
# //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
|
2197
1760
|
# @param patient_histories [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>, as a Hash
|
2198
1761
|
# * :category (CandidApiClient::Encounters::V4::Types::PatientHistoryCategoryEnum)
|
2199
1762
|
# * :questions (Array<CandidApiClient::Encounters::V4::Types::IntakeQuestion>)
|
@@ -2201,6 +1764,8 @@ module CandidApiClient
|
|
2201
1764
|
# `service_line.diagnosis_pointers`must contain at least one entry which should be
|
2202
1765
|
# in bounds of the diagnoses list field.Request of type Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>, as a Hash
|
2203
1766
|
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
1767
|
+
# * :has_epsdt_indicator (Boolean)
|
1768
|
+
# * :has_family_planning_indicator (Boolean)
|
2204
1769
|
# * :procedure_code (String)
|
2205
1770
|
# * :quantity (String)
|
2206
1771
|
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
@@ -2233,8 +1798,23 @@ module CandidApiClient
|
|
2233
1798
|
# * :last_name (String)
|
2234
1799
|
# * :organization_name (String)
|
2235
1800
|
# * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
|
2236
|
-
# @param
|
2237
|
-
#
|
1801
|
+
# @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
|
1802
|
+
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1803
|
+
# * :phone_consent (Boolean)
|
1804
|
+
# * :email (String)
|
1805
|
+
# * :email_consent (Boolean)
|
1806
|
+
# * :first_name (String)
|
1807
|
+
# * :last_name (String)
|
1808
|
+
# * :external_id (String)
|
1809
|
+
# * :date_of_birth (Date)
|
1810
|
+
# * :address (Hash)
|
1811
|
+
# * :zip_plus_four_code (String)
|
1812
|
+
# * :address_1 (String)
|
1813
|
+
# * :address_2 (String)
|
1814
|
+
# * :city (String)
|
1815
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1816
|
+
# * :zip_code (String)
|
1817
|
+
# @param external_claim_submission [Hash] To be included for claims that have been submitted outside of Candid.
|
2238
1818
|
# Candid supports posting remits and payments to these claims and working them
|
2239
1819
|
# in-platform (e.g. editing, resubmitting).Request of type CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate, as a Hash
|
2240
1820
|
# * :claim_created_at (DateTime)
|
@@ -2246,30 +1826,43 @@ module CandidApiClient
|
|
2246
1826
|
# instances cannot be created for the same schema on an encounter.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
|
2247
1827
|
# * :schema_id (String)
|
2248
1828
|
# * :content (Hash{String => Object})
|
1829
|
+
# @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
|
1830
|
+
# @param epsdt_referral [Hash] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
|
1831
|
+
# 837P formRequest of type CandidApiClient::Encounters::V4::Types::EpsdtReferral, as a Hash
|
1832
|
+
# * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
1833
|
+
# * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
1834
|
+
# * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
2249
1835
|
# @param request_options [CandidApiClient::RequestOptions]
|
2250
1836
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
2251
1837
|
# @example
|
2252
1838
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
2253
|
-
# api.encounters.v_4.
|
2254
|
-
#
|
2255
|
-
# pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"],
|
1839
|
+
# api.encounters.v_4.create(
|
1840
|
+
# patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], non_insurance_payers_info: [{ non_insurance_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string" }], 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 },
|
2256
1841
|
# 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", provider_commercial_license_type: LICENSED_CLINICAL_SOCIAL_WORKER, first_name: "string", last_name: "string", organization_name: "string" },
|
2257
1842
|
# rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
|
1843
|
+
# 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" },
|
2258
1844
|
# 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" },
|
2259
1845
|
# 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" },
|
2260
1846
|
# 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" }, secondary_identification: "string" },
|
1847
|
+
# 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 },
|
1848
|
+
# 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 },
|
1849
|
+
# prior_authorization_number: "string",
|
1850
|
+
# responsible_party: INSURANCE_PAY,
|
2261
1851
|
# diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
|
2262
|
-
# clinical_notes: [{ category: CLINICAL, notes:
|
1852
|
+
# clinical_notes: [{ category: CLINICAL, notes: }],
|
2263
1853
|
# billing_notes: [{ text: "string" }],
|
2264
1854
|
# place_of_service_code: PHARMACY,
|
2265
1855
|
# 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" }] }] }] }],
|
2266
|
-
# service_lines: [{
|
1856
|
+
# service_lines: [{ procedure_code: "string", quantity: "string", units: MJ, diagnosis_pointers: }],
|
1857
|
+
# 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" } },
|
2267
1858
|
# 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 }] },
|
2268
1859
|
# tag_ids: ["string"],
|
2269
|
-
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
1860
|
+
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
|
1861
|
+
# referral_number: "string",
|
1862
|
+
# epsdt_referral: { condition_indicator_1: AV, condition_indicator_2: AV, condition_indicator_3: AV }
|
2270
1863
|
# )
|
2271
|
-
def
|
2272
|
-
|
1864
|
+
def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
|
1865
|
+
provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, epsdt_referral: nil, request_options: nil)
|
2273
1866
|
Async do
|
2274
1867
|
response = @request_client.conn.post do |req|
|
2275
1868
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -2303,23 +1896,187 @@ module CandidApiClient
|
|
2303
1896
|
delay_reason_code: delay_reason_code,
|
2304
1897
|
additional_properties: additional_properties,
|
2305
1898
|
_field_set: _field_set,
|
2306
|
-
|
2307
|
-
pre_encounter_appointment_ids: pre_encounter_appointment_ids,
|
1899
|
+
patient: patient,
|
2308
1900
|
billing_provider: billing_provider,
|
2309
1901
|
rendering_provider: rendering_provider,
|
1902
|
+
referring_provider: referring_provider,
|
2310
1903
|
initial_referring_provider: initial_referring_provider,
|
2311
1904
|
supervising_provider: supervising_provider,
|
2312
1905
|
service_facility: service_facility,
|
1906
|
+
subscriber_primary: subscriber_primary,
|
1907
|
+
subscriber_secondary: subscriber_secondary,
|
1908
|
+
prior_authorization_number: prior_authorization_number,
|
1909
|
+
responsible_party: responsible_party,
|
2313
1910
|
diagnoses: diagnoses,
|
2314
1911
|
clinical_notes: clinical_notes,
|
2315
1912
|
billing_notes: billing_notes,
|
2316
1913
|
place_of_service_code: place_of_service_code,
|
2317
1914
|
patient_histories: patient_histories,
|
2318
1915
|
service_lines: service_lines,
|
1916
|
+
guarantor: guarantor,
|
2319
1917
|
external_claim_submission: external_claim_submission,
|
2320
1918
|
tag_ids: tag_ids,
|
2321
|
-
schema_instances: schema_instances
|
1919
|
+
schema_instances: schema_instances,
|
1920
|
+
referral_number: referral_number,
|
1921
|
+
epsdt_referral: epsdt_referral
|
1922
|
+
}.compact
|
1923
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
1924
|
+
request_options: request_options)}/api/encounters/v4"
|
1925
|
+
end
|
1926
|
+
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
1927
|
+
end
|
1928
|
+
end
|
1929
|
+
|
1930
|
+
# Create an encounter from a pre-encounter patient and appointment. This endpoint
|
1931
|
+
# is intended to be used by consumers who are managing
|
1932
|
+
# patients and appointments in the pre-encounter service and is currently under
|
1933
|
+
# development. Consumers who are not taking advantage
|
1934
|
+
# of the pre-encounter service should use the standard create endpoint.
|
1935
|
+
# The endpoint will create an encounter from the provided fields, pulling
|
1936
|
+
# information from the provided patient and appointment objects
|
1937
|
+
# where applicable. In particular, the following fields are populated from the
|
1938
|
+
# patient and appointment objects:
|
1939
|
+
# - Patient
|
1940
|
+
# - Referring Provider
|
1941
|
+
# - Subscriber Primary
|
1942
|
+
# - Subscriber Secondary
|
1943
|
+
# - Referral Number
|
1944
|
+
# - Responsible Party
|
1945
|
+
# - Guarantor
|
1946
|
+
# Utilizing this endpoint opts you into automatic updating of the encounter when
|
1947
|
+
# the patient or appointment is updated, assuming the
|
1948
|
+
# encounter has not already been submitted or adjudicated.
|
1949
|
+
#
|
1950
|
+
# @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreateFromPreEncounter, as a Hash
|
1951
|
+
# * :pre_encounter_patient_id (String)
|
1952
|
+
# * :pre_encounter_appointment_ids (Array<String>)
|
1953
|
+
# * :billing_provider (Hash)
|
1954
|
+
# * :address (Hash)
|
1955
|
+
# * :zip_plus_four_code (String)
|
1956
|
+
# * :address_1 (String)
|
1957
|
+
# * :address_2 (String)
|
1958
|
+
# * :city (String)
|
1959
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1960
|
+
# * :zip_code (String)
|
1961
|
+
# * :tax_id (String)
|
1962
|
+
# * :npi (String)
|
1963
|
+
# * :taxonomy_code (String)
|
1964
|
+
# * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
|
1965
|
+
# * :first_name (String)
|
1966
|
+
# * :last_name (String)
|
1967
|
+
# * :organization_name (String)
|
1968
|
+
# * :rendering_provider (Hash)
|
1969
|
+
# * :npi (String)
|
1970
|
+
# * :taxonomy_code (String)
|
1971
|
+
# * :address (Hash)
|
1972
|
+
# * :zip_plus_four_code (String)
|
1973
|
+
# * :address_1 (String)
|
1974
|
+
# * :address_2 (String)
|
1975
|
+
# * :city (String)
|
1976
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1977
|
+
# * :zip_code (String)
|
1978
|
+
# * :first_name (String)
|
1979
|
+
# * :last_name (String)
|
1980
|
+
# * :organization_name (String)
|
1981
|
+
# * :initial_referring_provider (Hash)
|
1982
|
+
# * :npi (String)
|
1983
|
+
# * :taxonomy_code (String)
|
1984
|
+
# * :address (Hash)
|
1985
|
+
# * :zip_plus_four_code (String)
|
1986
|
+
# * :address_1 (String)
|
1987
|
+
# * :address_2 (String)
|
1988
|
+
# * :city (String)
|
1989
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
1990
|
+
# * :zip_code (String)
|
1991
|
+
# * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
|
1992
|
+
# * :first_name (String)
|
1993
|
+
# * :last_name (String)
|
1994
|
+
# * :organization_name (String)
|
1995
|
+
# * :supervising_provider (Hash)
|
1996
|
+
# * :npi (String)
|
1997
|
+
# * :taxonomy_code (String)
|
1998
|
+
# * :address (Hash)
|
1999
|
+
# * :zip_plus_four_code (String)
|
2000
|
+
# * :address_1 (String)
|
2001
|
+
# * :address_2 (String)
|
2002
|
+
# * :city (String)
|
2003
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
2004
|
+
# * :zip_code (String)
|
2005
|
+
# * :first_name (String)
|
2006
|
+
# * :last_name (String)
|
2007
|
+
# * :organization_name (String)
|
2008
|
+
# * :service_facility (Hash)
|
2009
|
+
# * :organization_name (String)
|
2010
|
+
# * :npi (String)
|
2011
|
+
# * :address (Hash)
|
2012
|
+
# * :zip_plus_four_code (String)
|
2013
|
+
# * :address_1 (String)
|
2014
|
+
# * :address_2 (String)
|
2015
|
+
# * :city (String)
|
2016
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
2017
|
+
# * :zip_code (String)
|
2018
|
+
# * :secondary_identification (String)
|
2019
|
+
# * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
|
2020
|
+
# * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
|
2021
|
+
# * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
|
2022
|
+
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
2023
|
+
# * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
|
2024
|
+
# * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
|
2025
|
+
# * :external_claim_submission (Hash)
|
2026
|
+
# * :claim_created_at (DateTime)
|
2027
|
+
# * :patient_control_number (String)
|
2028
|
+
# * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
|
2029
|
+
# * :tag_ids (Array<String>)
|
2030
|
+
# * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
|
2031
|
+
# * :external_id (String)
|
2032
|
+
# * :date_of_service (Date)
|
2033
|
+
# * :end_date_of_service (Date)
|
2034
|
+
# * :patient_authorized_release (Boolean)
|
2035
|
+
# * :benefits_assigned_to_provider (Boolean)
|
2036
|
+
# * :provider_accepts_assignment (Boolean)
|
2037
|
+
# * :appointment_type (String)
|
2038
|
+
# * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
|
2039
|
+
# * :vitals (Hash)
|
2040
|
+
# * :height_in (Integer)
|
2041
|
+
# * :weight_lbs (Integer)
|
2042
|
+
# * :blood_pressure_systolic_mmhg (Integer)
|
2043
|
+
# * :blood_pressure_diastolic_mmhg (Integer)
|
2044
|
+
# * :body_temperature_f (Float)
|
2045
|
+
# * :hemoglobin_gdl (Float)
|
2046
|
+
# * :hematocrit_pct (Float)
|
2047
|
+
# * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
|
2048
|
+
# * :pay_to_address (Hash)
|
2049
|
+
# * :zip_plus_four_code (String)
|
2050
|
+
# * :address_1 (String)
|
2051
|
+
# * :address_2 (String)
|
2052
|
+
# * :city (String)
|
2053
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
2054
|
+
# * :zip_code (String)
|
2055
|
+
# * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
|
2056
|
+
# * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
|
2057
|
+
# * :additional_information (String)
|
2058
|
+
# * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
|
2059
|
+
# * :admission_date (Date)
|
2060
|
+
# * :discharge_date (Date)
|
2061
|
+
# * :onset_of_current_illness_or_symptom_date (Date)
|
2062
|
+
# * :last_menstrual_period_date (Date)
|
2063
|
+
# * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
|
2064
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
2065
|
+
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
2066
|
+
# @example
|
2067
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
2068
|
+
# api.encounters.v_4.create_from_pre_encounter_patient(request: { pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], 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", provider_commercial_license_type: LICENSED_CLINICAL_SOCIAL_WORKER, first_name: "string", last_name: "string", organization_name: "string" }, rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" }, 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" }, 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" }, 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" }, secondary_identification: "string" }, diagnoses: [{ name: "string", code_type: ABF, code: "string" }], clinical_notes: [{ category: CLINICAL, notes: }], billing_notes: [{ text: "string" }], place_of_service_code: PHARMACY, 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" }] }] }] }], service_lines: [{ procedure_code: "string", quantity: "string", units: MJ, diagnosis_pointers: }], 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 }] }, tag_ids: ["string"], schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }], external_id: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, appointment_type: "string", existing_medications: [{ name: "Lisinopril", rx_cui: "860975", dosage: "10mg", dosage_form: "Tablet", frequency: "Once Daily", as_needed: true }], 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 }, interventions: [{ name: "Physical Therapy Session", category: LIFESTYLE, description: "A session focused on improving muscular strength, flexibility, and range of motion post-injury.", medication: { name: "Lisinopril", rx_cui: "860975", dosage: "10mg", dosage_form: "Tablet", frequency: "Once Daily", as_needed: true }, labs: [{ name: "Genetic Health Labs", code: "GH12345", code_type: QUEST }] }], 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" }, synchronicity: SYNCHRONOUS, billable_status: BILLABLE, additional_information: "string", service_authorization_exception_code: C_1, admission_date: DateTime.parse(2023-01-15), discharge_date: DateTime.parse(2023-01-15), onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15), last_menstrual_period_date: DateTime.parse(2023-01-15), delay_reason_code: C_1 })
|
2069
|
+
def create_from_pre_encounter_patient(request:, request_options: nil)
|
2070
|
+
Async do
|
2071
|
+
response = @request_client.conn.post do |req|
|
2072
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
2073
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
2074
|
+
req.headers = {
|
2075
|
+
**(req.headers || {}),
|
2076
|
+
**@request_client.get_headers,
|
2077
|
+
**(request_options&.additional_headers || {})
|
2322
2078
|
}.compact
|
2079
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
2323
2080
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
2324
2081
|
request_options: request_options)}/api/encounters/v4/create-from-pre-encounter"
|
2325
2082
|
end
|
@@ -2327,6 +2084,163 @@ module CandidApiClient
|
|
2327
2084
|
end
|
2328
2085
|
end
|
2329
2086
|
|
2087
|
+
# Create an encounter from a pre-encounter patient and appointment. This endpoint
|
2088
|
+
# is intended to be used by consumers who are managing
|
2089
|
+
# patients and appointments in the pre-encounter service and is currently under
|
2090
|
+
# development. Consumers who are not taking advantage
|
2091
|
+
# of the pre-encounter service should use the standard create endpoint.
|
2092
|
+
# The endpoint will create an encounter from the provided fields, pulling
|
2093
|
+
# information from the provided patient and appointment objects
|
2094
|
+
# where applicable. In particular, the following fields are populated from the
|
2095
|
+
# patient and appointment objects:
|
2096
|
+
# - Patient
|
2097
|
+
# - Referring Provider
|
2098
|
+
# - Subscriber Primary
|
2099
|
+
# - Subscriber Secondary
|
2100
|
+
# - Referral Number
|
2101
|
+
# - Responsible Party
|
2102
|
+
# - Guarantor
|
2103
|
+
# Utilizing this endpoint opts you into automatic updating of the encounter when
|
2104
|
+
# the patient or appointment is updated, assuming the
|
2105
|
+
# encounter has not already been submitted or adjudicated.
|
2106
|
+
#
|
2107
|
+
# @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreateFromPreEncounter, as a Hash
|
2108
|
+
# * :pre_encounter_patient_id (String)
|
2109
|
+
# * :pre_encounter_appointment_ids (Array<String>)
|
2110
|
+
# * :billing_provider (Hash)
|
2111
|
+
# * :address (Hash)
|
2112
|
+
# * :zip_plus_four_code (String)
|
2113
|
+
# * :address_1 (String)
|
2114
|
+
# * :address_2 (String)
|
2115
|
+
# * :city (String)
|
2116
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
2117
|
+
# * :zip_code (String)
|
2118
|
+
# * :tax_id (String)
|
2119
|
+
# * :npi (String)
|
2120
|
+
# * :taxonomy_code (String)
|
2121
|
+
# * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
|
2122
|
+
# * :first_name (String)
|
2123
|
+
# * :last_name (String)
|
2124
|
+
# * :organization_name (String)
|
2125
|
+
# * :rendering_provider (Hash)
|
2126
|
+
# * :npi (String)
|
2127
|
+
# * :taxonomy_code (String)
|
2128
|
+
# * :address (Hash)
|
2129
|
+
# * :zip_plus_four_code (String)
|
2130
|
+
# * :address_1 (String)
|
2131
|
+
# * :address_2 (String)
|
2132
|
+
# * :city (String)
|
2133
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
2134
|
+
# * :zip_code (String)
|
2135
|
+
# * :first_name (String)
|
2136
|
+
# * :last_name (String)
|
2137
|
+
# * :organization_name (String)
|
2138
|
+
# * :initial_referring_provider (Hash)
|
2139
|
+
# * :npi (String)
|
2140
|
+
# * :taxonomy_code (String)
|
2141
|
+
# * :address (Hash)
|
2142
|
+
# * :zip_plus_four_code (String)
|
2143
|
+
# * :address_1 (String)
|
2144
|
+
# * :address_2 (String)
|
2145
|
+
# * :city (String)
|
2146
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
2147
|
+
# * :zip_code (String)
|
2148
|
+
# * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
|
2149
|
+
# * :first_name (String)
|
2150
|
+
# * :last_name (String)
|
2151
|
+
# * :organization_name (String)
|
2152
|
+
# * :supervising_provider (Hash)
|
2153
|
+
# * :npi (String)
|
2154
|
+
# * :taxonomy_code (String)
|
2155
|
+
# * :address (Hash)
|
2156
|
+
# * :zip_plus_four_code (String)
|
2157
|
+
# * :address_1 (String)
|
2158
|
+
# * :address_2 (String)
|
2159
|
+
# * :city (String)
|
2160
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
2161
|
+
# * :zip_code (String)
|
2162
|
+
# * :first_name (String)
|
2163
|
+
# * :last_name (String)
|
2164
|
+
# * :organization_name (String)
|
2165
|
+
# * :service_facility (Hash)
|
2166
|
+
# * :organization_name (String)
|
2167
|
+
# * :npi (String)
|
2168
|
+
# * :address (Hash)
|
2169
|
+
# * :zip_plus_four_code (String)
|
2170
|
+
# * :address_1 (String)
|
2171
|
+
# * :address_2 (String)
|
2172
|
+
# * :city (String)
|
2173
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
2174
|
+
# * :zip_code (String)
|
2175
|
+
# * :secondary_identification (String)
|
2176
|
+
# * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
|
2177
|
+
# * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
|
2178
|
+
# * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
|
2179
|
+
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
2180
|
+
# * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
|
2181
|
+
# * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
|
2182
|
+
# * :external_claim_submission (Hash)
|
2183
|
+
# * :claim_created_at (DateTime)
|
2184
|
+
# * :patient_control_number (String)
|
2185
|
+
# * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
|
2186
|
+
# * :tag_ids (Array<String>)
|
2187
|
+
# * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
|
2188
|
+
# * :external_id (String)
|
2189
|
+
# * :date_of_service (Date)
|
2190
|
+
# * :end_date_of_service (Date)
|
2191
|
+
# * :patient_authorized_release (Boolean)
|
2192
|
+
# * :benefits_assigned_to_provider (Boolean)
|
2193
|
+
# * :provider_accepts_assignment (Boolean)
|
2194
|
+
# * :appointment_type (String)
|
2195
|
+
# * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
|
2196
|
+
# * :vitals (Hash)
|
2197
|
+
# * :height_in (Integer)
|
2198
|
+
# * :weight_lbs (Integer)
|
2199
|
+
# * :blood_pressure_systolic_mmhg (Integer)
|
2200
|
+
# * :blood_pressure_diastolic_mmhg (Integer)
|
2201
|
+
# * :body_temperature_f (Float)
|
2202
|
+
# * :hemoglobin_gdl (Float)
|
2203
|
+
# * :hematocrit_pct (Float)
|
2204
|
+
# * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
|
2205
|
+
# * :pay_to_address (Hash)
|
2206
|
+
# * :zip_plus_four_code (String)
|
2207
|
+
# * :address_1 (String)
|
2208
|
+
# * :address_2 (String)
|
2209
|
+
# * :city (String)
|
2210
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
2211
|
+
# * :zip_code (String)
|
2212
|
+
# * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
|
2213
|
+
# * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
|
2214
|
+
# * :additional_information (String)
|
2215
|
+
# * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
|
2216
|
+
# * :admission_date (Date)
|
2217
|
+
# * :discharge_date (Date)
|
2218
|
+
# * :onset_of_current_illness_or_symptom_date (Date)
|
2219
|
+
# * :last_menstrual_period_date (Date)
|
2220
|
+
# * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
|
2221
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
2222
|
+
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
2223
|
+
# @example
|
2224
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
2225
|
+
# api.encounters.v_4.create_from_pre_encounter_patient_internal(request: { pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], 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", provider_commercial_license_type: LICENSED_CLINICAL_SOCIAL_WORKER, first_name: "string", last_name: "string", organization_name: "string" }, rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" }, 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" }, 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" }, 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" }, secondary_identification: "string" }, diagnoses: [{ name: "string", code_type: ABF, code: "string" }], clinical_notes: [{ category: CLINICAL, notes: }], billing_notes: [{ text: "string" }], place_of_service_code: PHARMACY, 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" }] }] }] }], service_lines: [{ procedure_code: "string", quantity: "string", units: MJ, diagnosis_pointers: }], 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 }] }, tag_ids: ["string"], schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }], external_id: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, appointment_type: "string", existing_medications: [{ name: "Lisinopril", rx_cui: "860975", dosage: "10mg", dosage_form: "Tablet", frequency: "Once Daily", as_needed: true }], 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 }, interventions: [{ name: "Physical Therapy Session", category: LIFESTYLE, description: "A session focused on improving muscular strength, flexibility, and range of motion post-injury.", medication: { name: "Lisinopril", rx_cui: "860975", dosage: "10mg", dosage_form: "Tablet", frequency: "Once Daily", as_needed: true }, labs: [{ name: "Genetic Health Labs", code: "GH12345", code_type: QUEST }] }], 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" }, synchronicity: SYNCHRONOUS, billable_status: BILLABLE, additional_information: "string", service_authorization_exception_code: C_1, admission_date: DateTime.parse(2023-01-15), discharge_date: DateTime.parse(2023-01-15), onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15), last_menstrual_period_date: DateTime.parse(2023-01-15), delay_reason_code: C_1 })
|
2226
|
+
def create_from_pre_encounter_patient_internal(request:, request_options: nil)
|
2227
|
+
Async do
|
2228
|
+
response = @request_client.conn.post do |req|
|
2229
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
2230
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
2231
|
+
req.headers = {
|
2232
|
+
**(req.headers || {}),
|
2233
|
+
**@request_client.get_headers,
|
2234
|
+
**(request_options&.additional_headers || {})
|
2235
|
+
}.compact
|
2236
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
2237
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
2238
|
+
request_options: request_options)}/api/encounters/v4/create-from-pre-encounter-internal"
|
2239
|
+
end
|
2240
|
+
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
2241
|
+
end
|
2242
|
+
end
|
2243
|
+
|
2330
2244
|
# @param encounter_id [String]
|
2331
2245
|
# @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you, not
|
2332
2246
|
# them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim
|
@@ -2635,6 +2549,11 @@ module CandidApiClient
|
|
2635
2549
|
# * :last_name (String)
|
2636
2550
|
# * :organization_name (String)
|
2637
2551
|
# @param referral_number [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
|
2552
|
+
# @param epsdt_referral [Hash] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
|
2553
|
+
# 837P formRequest of type CandidApiClient::Encounters::V4::Types::EpsdtReferral, as a Hash
|
2554
|
+
# * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
2555
|
+
# * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
2556
|
+
# * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
|
2638
2557
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
2639
2558
|
# @param _field_set [Object]
|
2640
2559
|
# @param diagnosis_ids [Array<String>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
@@ -2655,7 +2574,7 @@ module CandidApiClient
|
|
2655
2574
|
# place_of_service_code_as_submitted: PHARMACY
|
2656
2575
|
# )
|
2657
2576
|
def update(encounter_id:, benefits_assigned_to_provider: nil, prior_authorization_number: nil,
|
2658
|
-
external_id: nil, date_of_service: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, billing_provider: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, referral_number: nil, additional_properties: nil, _field_set: nil, diagnosis_ids: nil, place_of_service_code_as_submitted: nil, request_options: nil)
|
2577
|
+
external_id: nil, date_of_service: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, billing_provider: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, referral_number: nil, epsdt_referral: nil, additional_properties: nil, _field_set: nil, diagnosis_ids: nil, place_of_service_code_as_submitted: nil, request_options: nil)
|
2659
2578
|
Async do
|
2660
2579
|
response = @request_client.conn.patch do |req|
|
2661
2580
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -2703,6 +2622,7 @@ module CandidApiClient
|
|
2703
2622
|
referring_provider: referring_provider,
|
2704
2623
|
initial_referring_provider: initial_referring_provider,
|
2705
2624
|
referral_number: referral_number,
|
2625
|
+
epsdt_referral: epsdt_referral,
|
2706
2626
|
additional_properties: additional_properties,
|
2707
2627
|
_field_set: _field_set,
|
2708
2628
|
diagnosis_ids: diagnosis_ids,
|