Class: CandidApiClient::Encounters::V4::V4Client
- Inherits:
-
Object
- Object
- CandidApiClient::Encounters::V4::V4Client
- Defined in:
- lib/candidhealth/encounters/v_4/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:, 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) ⇒ CandidApiClient::Encounters::V4::Types::Encounter
-
#create_from_pre_encounter_patient(external_id:, patient_authorized_release:, 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) ⇒ CandidApiClient::Encounters::V4::Types::Encounter
Create an encounter from a pre-encounter patient and appointment.
- #get(encounter_id:, request_options: nil) ⇒ CandidApiClient::Encounters::V4::Types::Encounter
- #get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil, 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) ⇒ CandidApiClient::Encounters::V4::Types::EncounterPage
- #initialize(request_client:) ⇒ CandidApiClient::Encounters::V4::V4Client constructor
- #update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil, diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, billing_provider: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, referral_number: nil, request_options: nil) ⇒ CandidApiClient::Encounters::V4::Types::Encounter
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::Encounters::V4::V4Client
57 58 59 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 57 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
53 54 55 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 53 def request_client @request_client end |
Instance Method Details
#create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:, 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) ⇒ CandidApiClient::Encounters::V4::Types::Encounter
562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 562 def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:, 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) response = @request_client.conn.post do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(&.additional_body_parameters || {}), external_id: external_id, date_of_service: date_of_service, end_date_of_service: end_date_of_service, patient_authorized_release: , benefits_assigned_to_provider: benefits_assigned_to_provider, provider_accepts_assignment: provider_accepts_assignment, appointment_type: appointment_type, existing_medications: existing_medications, vitals: vitals, interventions: interventions, pay_to_address: pay_to_address, synchronicity: synchronicity, billable_status: billable_status, additional_information: additional_information, service_authorization_exception_code: , admission_date: admission_date, discharge_date: discharge_date, onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date, last_menstrual_period_date: last_menstrual_period_date, delay_reason_code: delay_reason_code, additional_properties: additional_properties, _field_set: _field_set, patient: patient, billing_provider: billing_provider, rendering_provider: rendering_provider, referring_provider: referring_provider, initial_referring_provider: initial_referring_provider, supervising_provider: supervising_provider, service_facility: service_facility, subscriber_primary: subscriber_primary, subscriber_secondary: subscriber_secondary, prior_authorization_number: , responsible_party: responsible_party, diagnoses: diagnoses, clinical_notes: clinical_notes, billing_notes: billing_notes, place_of_service_code: place_of_service_code, patient_histories: patient_histories, service_lines: service_lines, guarantor: guarantor, external_claim_submission: external_claim_submission, tag_ids: tag_ids, schema_instances: schema_instances, referral_number: referral_number }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/encounters/v4" end CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body) end |
#create_from_pre_encounter_patient(external_id:, patient_authorized_release:, 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) ⇒ CandidApiClient::Encounters::V4::Types::Encounter
Create an encounter from a pre-encounter patient and appointment. This endpoint
is intended to be used by consumers who are managing
patients and appointments in the pre-encounter service and is currently under
development. Consumers who are not taking advantage
of the pre-encounter service should use the standard create endpoint.
The endpoint will create an encounter from the provided fields, pulling
information from the provided patient and appointment objects
where applicable. In particular, the following fields are populated from the
patient and appointment objects:
- Patient
- Referring Provider
- Subscriber Primary
- Subscriber Secondary
- Referral Number
- Responsible Party
- Guarantor
Utilizing this endpoint opts you into automatic updating of the encounter when
the patient or appointment is updated, assuming the
encounter has not already been submitted or adjudicated.
932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 932 def create_from_pre_encounter_patient(external_id:, patient_authorized_release:, 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) response = @request_client.conn.post do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(&.additional_body_parameters || {}), external_id: external_id, date_of_service: date_of_service, end_date_of_service: end_date_of_service, patient_authorized_release: , benefits_assigned_to_provider: benefits_assigned_to_provider, provider_accepts_assignment: provider_accepts_assignment, appointment_type: appointment_type, existing_medications: existing_medications, vitals: vitals, interventions: interventions, pay_to_address: pay_to_address, synchronicity: synchronicity, billable_status: billable_status, additional_information: additional_information, service_authorization_exception_code: , admission_date: admission_date, discharge_date: discharge_date, onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date, last_menstrual_period_date: last_menstrual_period_date, delay_reason_code: delay_reason_code, additional_properties: additional_properties, _field_set: _field_set, pre_encounter_patient_id: pre_encounter_patient_id, pre_encounter_appointment_ids: pre_encounter_appointment_ids, billing_provider: billing_provider, rendering_provider: rendering_provider, initial_referring_provider: initial_referring_provider, supervising_provider: supervising_provider, service_facility: service_facility, diagnoses: diagnoses, clinical_notes: clinical_notes, billing_notes: billing_notes, place_of_service_code: place_of_service_code, patient_histories: patient_histories, service_lines: service_lines, external_claim_submission: external_claim_submission, tag_ids: tag_ids, schema_instances: schema_instances }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/encounters/v4/create-from-pre-encounter" end CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body) end |
#get(encounter_id:, request_options: nil) ⇒ CandidApiClient::Encounters::V4::Types::Encounter
143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 143 def get(encounter_id:, request_options: nil) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/encounters/v4/#{encounter_id}" end CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body) end |
#get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil, 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) ⇒ CandidApiClient::Encounters::V4::Types::EncounterPage
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 102 def get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil, 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) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.params = { **(&.additional_query_parameters || {}), "limit": limit, "claim_status": claim_status, "sort": sort, "page_token": page_token, "date_of_service_min": date_of_service_min, "date_of_service_max": date_of_service_max, "primary_payer_names": primary_payer_names, "search_term": search_term, "external_id": external_id, "diagnoses_updated_since": diagnoses_updated_since, "tag_ids": tag_ids, "work_queue_id": work_queue_id, "billable_status": billable_status, "responsible_party": responsible_party, "owner_of_next_action": owner_of_next_action, "patient_external_id": patient_external_id }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/encounters/v4" end CandidApiClient::Encounters::V4::Types::EncounterPage.from_json(json_object: response.body) end |
#update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil, diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, billing_provider: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, referral_number: nil, request_options: nil) ⇒ CandidApiClient::Encounters::V4::Types::Encounter
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 1348 def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil, diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, billing_provider: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, referral_number: nil, request_options: nil) response = @request_client.conn.patch do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(&.additional_body_parameters || {}), prior_authorization_number: , external_id: external_id, date_of_service: date_of_service, diagnosis_ids: diagnosis_ids, tag_ids: tag_ids, clinical_notes: clinical_notes, pay_to_address: pay_to_address, billable_status: billable_status, responsible_party: responsible_party, provider_accepts_assignment: provider_accepts_assignment, benefits_assigned_to_provider: benefits_assigned_to_provider, synchronicity: synchronicity, place_of_service_code: place_of_service_code, place_of_service_code_as_submitted: place_of_service_code_as_submitted, appointment_type: appointment_type, end_date_of_service: end_date_of_service, subscriber_primary: subscriber_primary, subscriber_secondary: subscriber_secondary, additional_information: additional_information, service_authorization_exception_code: , admission_date: admission_date, discharge_date: discharge_date, onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date, last_menstrual_period_date: last_menstrual_period_date, delay_reason_code: delay_reason_code, patient: patient, patient_authorized_release: , schema_instances: schema_instances, vitals: vitals, existing_medications: existing_medications, rendering_provider: rendering_provider, service_facility: service_facility, guarantor: guarantor, billing_provider: billing_provider, supervising_provider: supervising_provider, referring_provider: referring_provider, initial_referring_provider: initial_referring_provider, referral_number: referral_number }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/encounters/v4/#{encounter_id}" end CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body) end |