Class: CandidApiClient::ChargeCapture::V1::V1Client

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/charge_capture/v_1/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request_client:) ⇒ CandidApiClient::ChargeCapture::V1::V1Client

Parameters:



24
25
26
# File 'lib/candidhealth/charge_capture/v_1/client.rb', line 24

def initialize(request_client:)
  @request_client = request_client
end

Instance Attribute Details

#request_clientCandidApiClient::RequestClient (readonly)



20
21
22
# File 'lib/candidhealth/charge_capture/v_1/client.rb', line 20

def request_client
  @request_client
end

Instance Method Details

#create(data:, charge_external_id:, patient_external_id:, status:, ehr_source_url: nil, request_options: nil) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCapture

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.charge_capture.v_1.create(
  data: {  },
  charge_external_id: "charge_external_id",
  patient_external_id: "patient_external_id",
  status: PLANNED
)

Parameters:

  • data (Hash)

    Charge Capture data contains all the fields needed to create an encounter, but listed as optional. Candid will use this data when attempting to bundle multiple Charge Captures into a single encounter.Request of type CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData, as a Hash

    * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
    * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
    * :external_claim_submission (Hash)
      * :claim_created_at (DateTime)
      * :patient_control_number (String)
      * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
    * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
    * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
    * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
    * :patient (Hash)
      * :first_name (String)
      * :last_name (String)
      * :gender (CandidApiClient::Individual::Types::Gender)
      * :external_id (String)
      * :date_of_birth (Date)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
      * :phone_consent (Boolean)
      * :email (String)
      * :email_consent (Boolean)
      * :non_insurance_payers (Array<String>)
      * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
    * :service_facility (Hash)
      * :organization_name (String)
      * :npi (String)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :secondary_identification (String)
    * :rendering_provider (Hash)
      * :npi (String)
      * :taxonomy_code (String)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :first_name (String)
      * :last_name (String)
      * :organization_name (String)
    * :initial_referring_provider (Hash)
      * :npi (String)
      * :taxonomy_code (String)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
      * :first_name (String)
      * :last_name (String)
      * :organization_name (String)
    * :referring_provider (Hash)
      * :npi (String)
      * :taxonomy_code (String)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :first_name (String)
      * :last_name (String)
      * :organization_name (String)
    * :supervising_provider (Hash)
      * :npi (String)
      * :taxonomy_code (String)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :first_name (String)
      * :last_name (String)
      * :organization_name (String)
    * :billing_provider (Hash)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :tax_id (String)
      * :npi (String)
      * :taxonomy_code (String)
      * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
      * :first_name (String)
      * :last_name (String)
      * :organization_name (String)
    * :pay_to_address (Hash)
      * :zip_plus_four_code (String)
      * :address_1 (String)
      * :address_2 (String)
      * :city (String)
      * :state (CandidApiClient::Commons::Types::State)
      * :zip_code (String)
    * :benefits_assigned_to_provider (Boolean)
    * :prior_authorization_number (String)
    * :external_id (String)
    * :date_of_service (Date)
    * :tag_ids (Array<String>)
    * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
    * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
    * :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)
    * :provider_accepts_assignment (Boolean)
    * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
    * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
    * :appointment_type (String)
    * :end_date_of_service (Date)
    * :subscriber_primary (Hash)
      * :insurance_card (Hash)
        * :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 (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
        * :group_number (String)
        * :plan_name (String)
        * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
        * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
        * :payer_plan_group_id (String)
      * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
      * :date_of_birth (Date)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :first_name (String)
      * :last_name (String)
      * :gender (CandidApiClient::Individual::Types::Gender)
    * :subscriber_secondary (Hash)
      * :insurance_card (Hash)
        * :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 (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
        * :group_number (String)
        * :plan_name (String)
        * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
        * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
        * :payer_plan_group_id (String)
      * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
      * :date_of_birth (Date)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :first_name (String)
      * :last_name (String)
      * :gender (CandidApiClient::Individual::Types::Gender)
    * :subscriber_tertiary (Hash)
      * :insurance_card (Hash)
        * :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 (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
        * :group_number (String)
        * :plan_name (String)
        * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
        * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
        * :payer_plan_group_id (String)
      * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
      * :date_of_birth (Date)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :first_name (String)
      * :last_name (String)
      * :gender (CandidApiClient::Individual::Types::Gender)
    * :additional_information (String)
    * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
    * :admission_date (Date)
    * :discharge_date (Date)
    * :onset_of_current_illness_or_symptom_date (Date)
    * :last_menstrual_period_date (Date)
    * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
    * :patient_authorized_release (Boolean)
    * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
    * :vitals (Hash)
      * :height_in (Integer)
      * :weight_lbs (Integer)
      * :blood_pressure_systolic_mmhg (Integer)
      * :blood_pressure_diastolic_mmhg (Integer)
      * :body_temperature_f (Float)
      * :hemoglobin_gdl (Float)
      * :hematocrit_pct (Float)
    * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
    * :guarantor (Hash)
      * :first_name (String)
      * :last_name (String)
      * :external_id (String)
      * :date_of_birth (Date)
      * :address (Hash)
        * :zip_plus_four_code (String)
        * :address_1 (String)
        * :address_2 (String)
        * :city (String)
        * :state (CandidApiClient::Commons::Types::State)
        * :zip_code (String)
      * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
      * :phone_consent (Boolean)
      * :email (String)
      * :email_consent (Boolean)
    * :referral_number (String)
    * :epsdt_referral (Hash)
      * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
      * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
      * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
    * :claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>)
    * :secondary_payer_carrier_code (String)
    
  • charge_external_id (String)

    A client-specified unique ID to associate with this encounter; for example, your internal encounter ID or a Dr. Chrono encounter ID. This field should not contain PHI.

  • ehr_source_url (String) (defaults to: nil)

    External URL reference that links to Charge Capture details within the external system (e.g. the EHR visit page). Send full URL format for the external link (e.g. emr_charge_capture_url.com/123).

  • patient_external_id (String)

    The patient ID from the external EMR platform for the patient

  • status (CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus)

    the status of the charge capture

  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/candidhealth/charge_capture/v_1/client.rb', line 298

def create(data:, charge_external_id:, patient_external_id:, status:, ehr_source_url: nil, request_options: nil)
  response = @request_client.conn.post do |req|
    req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
    req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
    req.headers = {
  **(req.headers || {}),
  **@request_client.get_headers,
  **(request_options&.additional_headers || {})
    }.compact
    req.body = {
      **(request_options&.additional_body_parameters || {}),
      data: data,
      charge_external_id: charge_external_id,
      ehr_source_url: ehr_source_url,
      patient_external_id: patient_external_id,
      status: status
    }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/charge_captures/v1"
  end
  CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: response.body)
end

#get(charge_capture_id:, request_options: nil) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCapture

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.charge_capture.v_1.get(charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")

Parameters:

Returns:



616
617
618
619
620
621
622
623
624
625
626
627
628
629
# File 'lib/candidhealth/charge_capture/v_1/client.rb', line 616

def get(charge_capture_id:, request_options: nil)
  response = @request_client.conn.get do |req|
    req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
    req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
    req.headers = {
  **(req.headers || {}),
  **@request_client.get_headers,
  **(request_options&.additional_headers || {})
    }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/charge_captures/v1/#{charge_capture_id}"
  end
  CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: response.body)
end

#get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil, status: nil, charge_external_id: nil, date_of_service_min: nil, date_of_service_max: nil, claim_ids: nil, claim_creation_ids: nil, billing_provider_npis: nil, service_facility_name: nil, primary_payer_ids: nil, rendering_provider_npis: nil, rendering_provider_names: nil, supervising_provider_npis: nil, supervising_provider_names: nil, exclude_charges_linked_to_claims: nil, patient_external_id_ranked_sort: nil, status_ranked_sort: nil, charge_external_id_ranked_sort: nil, date_of_service_min_ranked_sort: nil, date_of_service_max_ranked_sort: nil, claim_ids_ranked_sort: nil, claim_creation_ids_ranked_sort: nil, billing_provider_npis_ranked_sort: nil, service_facility_name_ranked_sort: nil, primary_payer_ids_ranked_sort: nil, rendering_provider_npis_ranked_sort: nil, rendering_provider_names_ranked_sort: nil, supervising_provider_npis_ranked_sort: nil, supervising_provider_names_ranked_sort: nil, request_options: nil) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePage

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.charge_capture.v_1.get_all

Parameters:

  • limit (Integer) (defaults to: nil)

    Maximum number of entities per page, defaults to 100.

  • sort (CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureSortField) (defaults to: nil)

    Defaults to created_at

  • sort_direction (CandidApiClient::Commons::Types::SortDirection) (defaults to: nil)

    Sort direction. Defaults to descending order if not provided.

  • page_token (String) (defaults to: nil)
  • patient_external_id (String) (defaults to: nil)

    The patient ID from the external EMR platform for the patient

  • status (CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus) (defaults to: nil)

    the status of the charge captures

  • charge_external_id (String) (defaults to: nil)

    A client-specified unique ID to associate with this encounter; for example, your internal encounter ID or a Dr. Chrono encounter ID. This field should not contain PHI.

  • date_of_service_min (Date) (defaults to: nil)

    Date formatted as YYYY-MM-DD; eg: 2019-08-24. This date must be the local date in the timezone where the service occurred.

  • date_of_service_max (Date) (defaults to: nil)

    Date formatted as YYYY-MM-DD; eg: 2019-08-24. This date must be the local date in the timezone where the service occurred.

  • claim_ids (String) (defaults to: nil)

    A list of claim IDs to filter by. This will return all charge captures that have a resulting claim with one of the IDs in this list.

  • claim_creation_ids (String) (defaults to: nil)

    A list of Claim Creation IDs to filter by.

  • billing_provider_npis (String) (defaults to: nil)

    A list of billing provider NPIs to filter by. This will return all charge captures with one of the NPIs in this list.

  • service_facility_name (String) (defaults to: nil)

    A string to filter by. This will return all charge captures with this service facility name.

  • primary_payer_ids (String) (defaults to: nil)

    A list of primary payer IDs to filter by. This will return all charge captures with one of the primary payer IDs in this list.

  • rendering_provider_npis (String) (defaults to: nil)

    A list of rendering provider NPIs to filter by. This will return all charge captures with one of the NPIs in this list.

  • rendering_provider_names (String) (defaults to: nil)

    A list of rendering provider names to filter by. This will return all charge captures with one of the names in this list.

  • supervising_provider_npis (String) (defaults to: nil)

    A list of supervising provider NPIs to filter by. This will return all charge captures with one of the NPIs in this list.

  • supervising_provider_names (String) (defaults to: nil)

    A list of supervising provider names to filter by. This will return all charge captures with one of the names in this list.

  • exclude_charges_linked_to_claims (Boolean) (defaults to: nil)

    Whether to exclude charge captures which are part of a claim creation.

  • patient_external_id_ranked_sort (String) (defaults to: nil)

    The patient ID from the external EMR platform for the patient

  • status_ranked_sort (CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus) (defaults to: nil)

    The charge capture status to show first

  • charge_external_id_ranked_sort (String) (defaults to: nil)

    A client-specified unique ID to associate with this encounter; for example, your internal encounter ID or a Dr. Chrono encounter ID. This field should not contain PHI.

  • date_of_service_min_ranked_sort (Date) (defaults to: nil)

    Date formatted as YYYY-MM-DD; eg: 2019-08-24. This date must be the local date in the timezone where the service occurred.

  • date_of_service_max_ranked_sort (Date) (defaults to: nil)

    Date formatted as YYYY-MM-DD; eg: 2019-08-24. This date must be the local date in the timezone where the service occurred.

  • claim_ids_ranked_sort (String) (defaults to: nil)

    A list of claim IDs to show first. This will return all charge captures that have a resulting claim with one of the IDs in this list.

  • claim_creation_ids_ranked_sort (String) (defaults to: nil)

    A list of Claim Creation IDs to show first.

  • billing_provider_npis_ranked_sort (String) (defaults to: nil)

    A list of billing provider NPIs to show first. This will return all charge captures with one of the NPIs in this list.

  • service_facility_name_ranked_sort (String) (defaults to: nil)

    A string to show first. This will return all charge captures with this service facility name.

  • primary_payer_ids_ranked_sort (String) (defaults to: nil)

    A list of primary payer IDs to show first. This will return all charge captures with one of the primary payer IDs in this list.

  • rendering_provider_npis_ranked_sort (String) (defaults to: nil)

    A list of rendering provider NPIs to show first. This will return all charge captures with one of the NPIs in this list.

  • rendering_provider_names_ranked_sort (String) (defaults to: nil)

    A list of rendering provider names to show first. This will return all charge captures with one of the names in this list.

  • supervising_provider_npis_ranked_sort (String) (defaults to: nil)

    A list of supervising provider NPIs to show first. This will return all charge captures with one of the NPIs in this list.

  • supervising_provider_names_ranked_sort (String) (defaults to: nil)

    A list of supervising provider names to show first. This will return all charge captures with one of the names in this list.

  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'lib/candidhealth/charge_capture/v_1/client.rb', line 693

def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil, status: nil,
            charge_external_id: nil, date_of_service_min: nil, date_of_service_max: nil, claim_ids: nil, claim_creation_ids: nil, billing_provider_npis: nil, service_facility_name: nil, primary_payer_ids: nil, rendering_provider_npis: nil, rendering_provider_names: nil, supervising_provider_npis: nil, supervising_provider_names: nil, exclude_charges_linked_to_claims: nil, patient_external_id_ranked_sort: nil, status_ranked_sort: nil, charge_external_id_ranked_sort: nil, date_of_service_min_ranked_sort: nil, date_of_service_max_ranked_sort: nil, claim_ids_ranked_sort: nil, claim_creation_ids_ranked_sort: nil, billing_provider_npis_ranked_sort: nil, service_facility_name_ranked_sort: nil, primary_payer_ids_ranked_sort: nil, rendering_provider_npis_ranked_sort: nil, rendering_provider_names_ranked_sort: nil, supervising_provider_npis_ranked_sort: nil, supervising_provider_names_ranked_sort: nil, request_options: nil)
  response = @request_client.conn.get do |req|
    req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
    req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
    req.headers = {
  **(req.headers || {}),
  **@request_client.get_headers,
  **(request_options&.additional_headers || {})
    }.compact
    req.params = {
      **(request_options&.additional_query_parameters || {}),
      "limit": limit,
      "sort": sort,
      "sort_direction": sort_direction,
      "page_token": page_token,
      "patient_external_id": patient_external_id,
      "status": status,
      "charge_external_id": charge_external_id,
      "date_of_service_min": date_of_service_min,
      "date_of_service_max": date_of_service_max,
      "claim_ids": claim_ids,
      "claim_creation_ids": claim_creation_ids,
      "billing_provider_npis": billing_provider_npis,
      "service_facility_name": service_facility_name,
      "primary_payer_ids": primary_payer_ids,
      "rendering_provider_npis": rendering_provider_npis,
      "rendering_provider_names": rendering_provider_names,
      "supervising_provider_npis": supervising_provider_npis,
      "supervising_provider_names": supervising_provider_names,
      "exclude_charges_linked_to_claims": exclude_charges_linked_to_claims,
      "patient_external_id_ranked_sort": patient_external_id_ranked_sort,
      "status_ranked_sort": status_ranked_sort,
      "charge_external_id_ranked_sort": charge_external_id_ranked_sort,
      "date_of_service_min_ranked_sort": date_of_service_min_ranked_sort,
      "date_of_service_max_ranked_sort": date_of_service_max_ranked_sort,
      "claim_ids_ranked_sort": claim_ids_ranked_sort,
      "claim_creation_ids_ranked_sort": claim_creation_ids_ranked_sort,
      "billing_provider_npis_ranked_sort": billing_provider_npis_ranked_sort,
      "service_facility_name_ranked_sort": service_facility_name_ranked_sort,
      "primary_payer_ids_ranked_sort": primary_payer_ids_ranked_sort,
      "rendering_provider_npis_ranked_sort": rendering_provider_npis_ranked_sort,
      "rendering_provider_names_ranked_sort": rendering_provider_names_ranked_sort,
      "supervising_provider_npis_ranked_sort": supervising_provider_npis_ranked_sort,
      "supervising_provider_names_ranked_sort": supervising_provider_names_ranked_sort
    }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/charge_captures/v1"
  end
  CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePage.from_json(json_object: response.body)
end

#update(charge_capture_id:, data: nil, charge_external_id: nil, ehr_source_url: nil, patient_external_id: nil, status: nil, request_options: nil) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCapture

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.charge_capture.v_1.update(charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")

Parameters:

  • charge_capture_id (String)
  • data (Hash) (defaults to: nil)

    Request of type CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData, as a Hash

    • :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)

    • :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)

    • :external_claim_submission (Hash)

      • :claim_created_at (DateTime)

      • :patient_control_number (String)

      • :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)

    • :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)

    • :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)

    • :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)

    • :patient (Hash)

      • :first_name (String)

      • :last_name (String)

      • :gender (CandidApiClient::Individual::Types::Gender)

      • :external_id (String)

      • :date_of_birth (Date)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)

      • :phone_consent (Boolean)

      • :email (String)

      • :email_consent (Boolean)

      • :non_insurance_payers (Array<String>)

      • :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)

    • :service_facility (Hash)

      • :organization_name (String)

      • :npi (String)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :secondary_identification (String)

    • :rendering_provider (Hash)

      • :npi (String)

      • :taxonomy_code (String)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :first_name (String)

      • :last_name (String)

      • :organization_name (String)

    • :initial_referring_provider (Hash)

      • :npi (String)

      • :taxonomy_code (String)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :qualifier (CandidApiClient::Commons::Types::QualifierCode)

      • :first_name (String)

      • :last_name (String)

      • :organization_name (String)

    • :referring_provider (Hash)

      • :npi (String)

      • :taxonomy_code (String)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :first_name (String)

      • :last_name (String)

      • :organization_name (String)

    • :supervising_provider (Hash)

      • :npi (String)

      • :taxonomy_code (String)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :first_name (String)

      • :last_name (String)

      • :organization_name (String)

    • :billing_provider (Hash)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :tax_id (String)

      • :npi (String)

      • :taxonomy_code (String)

      • :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)

      • :first_name (String)

      • :last_name (String)

      • :organization_name (String)

    • :pay_to_address (Hash)

      • :zip_plus_four_code (String)

      • :address_1 (String)

      • :address_2 (String)

      • :city (String)

      • :state (CandidApiClient::Commons::Types::State)

      • :zip_code (String)

    • :benefits_assigned_to_provider (Boolean)

    • :prior_authorization_number (String)

    • :external_id (String)

    • :date_of_service (Date)

    • :tag_ids (Array<String>)

    • :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)

    • :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)

    • :responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType)

    • :provider_accepts_assignment (Boolean)

    • :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)

    • :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)

    • :appointment_type (String)

    • :end_date_of_service (Date)

    • :subscriber_primary (Hash)

      • :insurance_card (Hash)

        • :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 (CandidApiClient::Commons::Types::EmrPayerCrosswalk)

        • :group_number (String)

        • :plan_name (String)

        • :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)

        • :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)

        • :payer_plan_group_id (String)

      • :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)

      • :date_of_birth (Date)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :first_name (String)

      • :last_name (String)

      • :gender (CandidApiClient::Individual::Types::Gender)

    • :subscriber_secondary (Hash)

      • :insurance_card (Hash)

        • :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 (CandidApiClient::Commons::Types::EmrPayerCrosswalk)

        • :group_number (String)

        • :plan_name (String)

        • :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)

        • :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)

        • :payer_plan_group_id (String)

      • :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)

      • :date_of_birth (Date)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :first_name (String)

      • :last_name (String)

      • :gender (CandidApiClient::Individual::Types::Gender)

    • :subscriber_tertiary (Hash)

      • :insurance_card (Hash)

        • :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 (CandidApiClient::Commons::Types::EmrPayerCrosswalk)

        • :group_number (String)

        • :plan_name (String)

        • :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)

        • :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)

        • :payer_plan_group_id (String)

      • :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)

      • :date_of_birth (Date)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :first_name (String)

      • :last_name (String)

      • :gender (CandidApiClient::Individual::Types::Gender)

    • :additional_information (String)

    • :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)

    • :admission_date (Date)

    • :discharge_date (Date)

    • :onset_of_current_illness_or_symptom_date (Date)

    • :last_menstrual_period_date (Date)

    • :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)

    • :patient_authorized_release (Boolean)

    • :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)

    • :vitals (Hash)

      • :height_in (Integer)

      • :weight_lbs (Integer)

      • :blood_pressure_systolic_mmhg (Integer)

      • :blood_pressure_diastolic_mmhg (Integer)

      • :body_temperature_f (Float)

      • :hemoglobin_gdl (Float)

      • :hematocrit_pct (Float)

    • :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)

    • :guarantor (Hash)

      • :first_name (String)

      • :last_name (String)

      • :external_id (String)

      • :date_of_birth (Date)

      • :address (Hash)

        • :zip_plus_four_code (String)

        • :address_1 (String)

        • :address_2 (String)

        • :city (String)

        • :state (CandidApiClient::Commons::Types::State)

        • :zip_code (String)

      • :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)

      • :phone_consent (Boolean)

      • :email (String)

      • :email_consent (Boolean)

    • :referral_number (String)

    • :epsdt_referral (Hash)

      • :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)

      • :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)

      • :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)

    • :claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>)

    • :secondary_payer_carrier_code (String)

  • charge_external_id (String) (defaults to: nil)

    A client-specified unique ID to associate with this encounter; for example, your internal encounter ID or a Dr. Chrono encounter ID. This field should not contain PHI.

  • ehr_source_url (String) (defaults to: nil)

    External URL reference that links to Charge Capture details within the external system (e.g. the EHR visit page). Send full URL format for the external link (e.g. emr_charge_capture_url.com/123).

  • patient_external_id (String) (defaults to: nil)

    The patient ID from the external EMR platform for the patient

  • status (CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus) (defaults to: nil)

    the status of the charge capture

  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
# File 'lib/candidhealth/charge_capture/v_1/client.rb', line 586

def update(charge_capture_id:, data: nil, charge_external_id: nil, ehr_source_url: nil,
           patient_external_id: nil, status: nil, request_options: nil)
  response = @request_client.conn.patch do |req|
    req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
    req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
    req.headers = {
  **(req.headers || {}),
  **@request_client.get_headers,
  **(request_options&.additional_headers || {})
    }.compact
    req.body = {
      **(request_options&.additional_body_parameters || {}),
      data: data,
      charge_external_id: charge_external_id,
      ehr_source_url: ehr_source_url,
      patient_external_id: patient_external_id,
      status: status
    }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/charge_captures/v1/#{charge_capture_id}"
  end
  CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: response.body)
end

#update_post_billed_changes(charge_capture_change_ids:, resolved:, request_options: nil) ⇒ Array<CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange>

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api.charge_capture.v_1.update_post_billed_changes(charge_capture_change_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], resolved: true)

Parameters:

  • charge_capture_change_ids (Array<String>)

    A list of UUIDs corresponding to ChargeCapturePostBilledChanges. All of the charges sent will be marked as resolved

  • resolved (Boolean)

    Whether the change has been resolved. If true, the change will be marked as resolved. If false, the change will be marked as unresolved.

  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
# File 'lib/candidhealth/charge_capture/v_1/client.rb', line 755

def update_post_billed_changes(charge_capture_change_ids:, resolved:, request_options: nil)
  response = @request_client.conn.patch do |req|
    req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
    req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
    req.headers = {
  **(req.headers || {}),
  **@request_client.get_headers,
  **(request_options&.additional_headers || {})
    }.compact
    req.body = {
      **(request_options&.additional_body_parameters || {}),
      charge_capture_change_ids: charge_capture_change_ids,
      resolved: resolved
    }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/charge_captures/v1/changes"
  end
  parsed_json = JSON.parse(response.body)
  parsed_json&.map do |item|
    item = item.to_json
    CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange.from_json(json_object: item)
  end
end