Class: CandidApiClient::Encounters::V4::AsyncV4Client
- Inherits:
-
Object
- Object
- CandidApiClient::Encounters::V4::AsyncV4Client
- 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::AsyncV4Client 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::AsyncV4Client
1412 1413 1414 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 1412 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
1408 1409 1410 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 1408 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
1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 1921 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) Async do 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 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.
2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 2293 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) Async do 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 end |
#get(encounter_id:, request_options: nil) ⇒ CandidApiClient::Encounters::V4::Types::Encounter
1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 1500 def get(encounter_id:, request_options: nil) Async do 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 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
1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 1457 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) Async do 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 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
2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 |
# File 'lib/candidhealth/encounters/v_4/client.rb', line 2711 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) Async do 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 end |