Class: CandidApiClient::PreEncounter::Lists::V1::V1Client
- Inherits:
-
Object
- Object
- CandidApiClient::PreEncounter::Lists::V1::V1Client
- Defined in:
- lib/candidhealth/pre_encounter/lists/v_1/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#get_appointment_list(sort_field: nil, sort_direction: nil, limit: nil, page_token: nil, filters: nil, request_options: nil) ⇒ CandidApiClient::PreEncounter::Lists::V1::Types::AppointmentListPage
Searches for appointments that match the query parameters.
-
#get_patient_list(page_token: nil, limit: nil, sort_field: nil, sort_direction: nil, filters: nil, request_options: nil) ⇒ CandidApiClient::PreEncounter::Lists::V1::Types::PatientListPage
Gets patients with dependent objects for patients that match the query parameters.
- #initialize(request_client:) ⇒ CandidApiClient::PreEncounter::Lists::V1::V1Client constructor
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::PreEncounter::Lists::V1::V1Client
19 20 21 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 19 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
15 16 17 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 15 def request_client @request_client end |
Instance Method Details
#get_appointment_list(sort_field: nil, sort_direction: nil, limit: nil, page_token: nil, filters: nil, request_options: nil) ⇒ CandidApiClient::PreEncounter::Lists::V1::Types::AppointmentListPage
Searches for appointments that match the query parameters.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 84 def get_appointment_list(sort_field: nil, sort_direction: nil, limit: nil, page_token: nil, filters: 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 || {}), "sort_field": sort_field, "sort_direction": sort_direction, "limit": limit, "page_token": page_token, "filters": filters }.compact req.url "#{@request_client.get_url(environment: PreEncounter, request_options: )}/lists/v1/appointment" end CandidApiClient::PreEncounter::Lists::V1::Types::AppointmentListPage.from_json(json_object: response.body) end |
#get_patient_list(page_token: nil, limit: nil, sort_field: nil, sort_direction: nil, filters: nil, request_options: nil) ⇒ CandidApiClient::PreEncounter::Lists::V1::Types::PatientListPage
Gets patients with dependent objects for patients that match the query
parameters.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 42 def get_patient_list(page_token: nil, limit: nil, sort_field: nil, sort_direction: nil, filters: 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 || {}), "page_token": page_token, "limit": limit, "sort_field": sort_field, "sort_direction": sort_direction, "filters": filters }.compact req.url "#{@request_client.get_url(environment: PreEncounter, request_options: )}/lists/v1/patient" end CandidApiClient::PreEncounter::Lists::V1::Types::PatientListPage.from_json(json_object: response.body) end |