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
103 104 105 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 103 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
99 100 101 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 99 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.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 158 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.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/candidhealth/pre_encounter/lists/v_1/client.rb', line 120 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 |