Class: CandidApiClient::PreEncounter::Lists::V1::AsyncV1Client
- Inherits:
-
Object
- Object
- CandidApiClient::PreEncounter::Lists::V1::AsyncV1Client
- 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::AsyncV1Client constructor
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::PreEncounter::Lists::V1::AsyncV1Client
115 116 117 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 115 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
111 112 113 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 111 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.
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 182 def get_appointment_list(sort_field: nil, sort_direction: nil, limit: nil, page_token: nil, filters: 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 || {}), "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 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.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 138 def get_patient_list(page_token: nil, limit: nil, sort_field: nil, sort_direction: nil, filters: 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 || {}), "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 end |