rxfoundry.clients.swifty-api 0.0.593__py3-none-any.whl → 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rxfoundry/clients/swifty_api/models/virtual_pharmacy.py +3 -1
- {rxfoundry_clients_swifty_api-0.0.593.dist-info → rxfoundry_clients_swifty_api-1.0.0.dist-info}/METADATA +1 -1
- rxfoundry_clients_swifty_api-1.0.0.dist-info/RECORD +61 -0
- rxfoundry/clients/p2rx_api/__init__.py +0 -79
- rxfoundry/clients/p2rx_api/api/__init__.py +0 -17
- rxfoundry/clients/p2rx_api/api/async_api.py +0 -862
- rxfoundry/clients/p2rx_api/api/code_api.py +0 -337
- rxfoundry/clients/p2rx_api/api/fax_api.py +0 -632
- rxfoundry/clients/p2rx_api/api/medication_api.py +0 -666
- rxfoundry/clients/p2rx_api/api/patient_api.py +0 -981
- rxfoundry/clients/p2rx_api/api/pharmacist_api.py +0 -615
- rxfoundry/clients/p2rx_api/api/pharmacy_api.py +0 -684
- rxfoundry/clients/p2rx_api/api/prescriber_api.py +0 -615
- rxfoundry/clients/p2rx_api/api/prescription_api.py +0 -1864
- rxfoundry/clients/p2rx_api/api/token_api.py +0 -314
- rxfoundry/clients/p2rx_api/api/user_api.py +0 -306
- rxfoundry/clients/p2rx_api/api/version_api.py +0 -282
- rxfoundry/clients/p2rx_api/api/virtual_pharmacy_api.py +0 -284
- rxfoundry/clients/p2rx_api/api_client.py +0 -798
- rxfoundry/clients/p2rx_api/api_response.py +0 -21
- rxfoundry/clients/p2rx_api/configuration.py +0 -583
- rxfoundry/clients/p2rx_api/exceptions.py +0 -217
- rxfoundry/clients/p2rx_api/models/__init__.py +0 -50
- rxfoundry/clients/p2rx_api/models/address.py +0 -106
- rxfoundry/clients/p2rx_api/models/asynchronous_response.py +0 -90
- rxfoundry/clients/p2rx_api/models/code.py +0 -92
- rxfoundry/clients/p2rx_api/models/code_qualifier_code.py +0 -96
- rxfoundry/clients/p2rx_api/models/error_message.py +0 -90
- rxfoundry/clients/p2rx_api/models/fax.py +0 -141
- rxfoundry/clients/p2rx_api/models/medication.py +0 -137
- rxfoundry/clients/p2rx_api/models/medication_program_pricing.py +0 -99
- rxfoundry/clients/p2rx_api/models/medication_variant.py +0 -96
- rxfoundry/clients/p2rx_api/models/patient.py +0 -128
- rxfoundry/clients/p2rx_api/models/patient_activity_notification.py +0 -114
- rxfoundry/clients/p2rx_api/models/patient_external_identifier.py +0 -94
- rxfoundry/clients/p2rx_api/models/pharmacist.py +0 -104
- rxfoundry/clients/p2rx_api/models/pharmacy.py +0 -156
- rxfoundry/clients/p2rx_api/models/pharmacy_chain.py +0 -100
- rxfoundry/clients/p2rx_api/models/pharmacy_other_identifier.py +0 -98
- rxfoundry/clients/p2rx_api/models/pharmacy_program_pricing.py +0 -103
- rxfoundry/clients/p2rx_api/models/prescriber.py +0 -106
- rxfoundry/clients/p2rx_api/models/prescription.py +0 -278
- rxfoundry/clients/p2rx_api/models/prescription_change_request.py +0 -123
- rxfoundry/clients/p2rx_api/models/prescription_issue.py +0 -120
- rxfoundry/clients/p2rx_api/models/prescription_patch.py +0 -113
- rxfoundry/clients/p2rx_api/models/prescription_task.py +0 -130
- rxfoundry/clients/p2rx_api/models/prescription_task_status.py +0 -95
- rxfoundry/clients/p2rx_api/models/prescription_transfer_request.py +0 -93
- rxfoundry/clients/p2rx_api/models/prescription_verification.py +0 -107
- rxfoundry/clients/p2rx_api/models/pricing_program.py +0 -90
- rxfoundry/clients/p2rx_api/models/surescripts_message.py +0 -111
- rxfoundry/clients/p2rx_api/models/token.py +0 -92
- rxfoundry/clients/p2rx_api/models/user.py +0 -98
- rxfoundry/clients/p2rx_api/models/version.py +0 -88
- rxfoundry/clients/p2rx_api/models/virtual_pharmacy.py +0 -96
- rxfoundry/clients/p2rx_api/models/workflow_request.py +0 -90
- rxfoundry/clients/p2rx_api/py.typed +0 -0
- rxfoundry/clients/p2rx_api/rest.py +0 -259
- rxfoundry_clients_swifty_api-0.0.593.dist-info/RECORD +0 -116
- {rxfoundry_clients_swifty_api-0.0.593.dist-info → rxfoundry_clients_swifty_api-1.0.0.dist-info}/WHEEL +0 -0
- {rxfoundry_clients_swifty_api-0.0.593.dist-info → rxfoundry_clients_swifty_api-1.0.0.dist-info}/top_level.txt +0 -0
|
@@ -1,981 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
P2RX API
|
|
5
|
-
|
|
6
|
-
API for the P2RX Backend
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
-
Contact: paul.tindall@rxfoundry.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
import warnings
|
|
16
|
-
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
-
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
-
from typing_extensions import Annotated
|
|
19
|
-
|
|
20
|
-
from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
|
21
|
-
from typing import List, Optional, Union
|
|
22
|
-
from typing_extensions import Annotated
|
|
23
|
-
from rxfoundry.clients.swifty_api.models.patient import Patient
|
|
24
|
-
from rxfoundry.clients.swifty_api.models.pharmacy import Pharmacy
|
|
25
|
-
|
|
26
|
-
from rxfoundry.clients.swifty_api.api_client import ApiClient, RequestSerialized
|
|
27
|
-
from rxfoundry.clients.swifty_api.api_response import ApiResponse
|
|
28
|
-
from rxfoundry.clients.swifty_api.rest import RESTResponseType
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class PatientApi:
|
|
32
|
-
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
-
Ref: https://openapi-generator.tech
|
|
34
|
-
|
|
35
|
-
Do not edit the class manually.
|
|
36
|
-
"""
|
|
37
|
-
|
|
38
|
-
def __init__(self, api_client=None) -> None:
|
|
39
|
-
if api_client is None:
|
|
40
|
-
api_client = ApiClient.get_default()
|
|
41
|
-
self.api_client = api_client
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
@validate_call
|
|
45
|
-
def get_patient(
|
|
46
|
-
self,
|
|
47
|
-
patient_uuid: StrictStr,
|
|
48
|
-
_request_timeout: Union[
|
|
49
|
-
None,
|
|
50
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
-
Tuple[
|
|
52
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
-
]
|
|
55
|
-
] = None,
|
|
56
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
-
_content_type: Optional[StrictStr] = None,
|
|
58
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
-
) -> Patient:
|
|
61
|
-
"""Get patient by uuid
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
:param patient_uuid: (required)
|
|
65
|
-
:type patient_uuid: str
|
|
66
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
67
|
-
number provided, it will be total request
|
|
68
|
-
timeout. It can also be a pair (tuple) of
|
|
69
|
-
(connection, read) timeouts.
|
|
70
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
71
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
72
|
-
request; this effectively ignores the
|
|
73
|
-
authentication in the spec for a single request.
|
|
74
|
-
:type _request_auth: dict, optional
|
|
75
|
-
:param _content_type: force content-type for the request.
|
|
76
|
-
:type _content_type: str, Optional
|
|
77
|
-
:param _headers: set to override the headers for a single
|
|
78
|
-
request; this effectively ignores the headers
|
|
79
|
-
in the spec for a single request.
|
|
80
|
-
:type _headers: dict, optional
|
|
81
|
-
:param _host_index: set to override the host_index for a single
|
|
82
|
-
request; this effectively ignores the host_index
|
|
83
|
-
in the spec for a single request.
|
|
84
|
-
:type _host_index: int, optional
|
|
85
|
-
:return: Returns the result object.
|
|
86
|
-
""" # noqa: E501
|
|
87
|
-
|
|
88
|
-
_param = self._get_patient_serialize(
|
|
89
|
-
patient_uuid=patient_uuid,
|
|
90
|
-
_request_auth=_request_auth,
|
|
91
|
-
_content_type=_content_type,
|
|
92
|
-
_headers=_headers,
|
|
93
|
-
_host_index=_host_index
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
97
|
-
'200': "Patient",
|
|
98
|
-
'404': None,
|
|
99
|
-
}
|
|
100
|
-
response_data = self.api_client.call_api(
|
|
101
|
-
*_param,
|
|
102
|
-
_request_timeout=_request_timeout
|
|
103
|
-
)
|
|
104
|
-
response_data.read()
|
|
105
|
-
return self.api_client.response_deserialize(
|
|
106
|
-
response_data=response_data,
|
|
107
|
-
response_types_map=_response_types_map,
|
|
108
|
-
).data
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
@validate_call
|
|
112
|
-
def get_patient_with_http_info(
|
|
113
|
-
self,
|
|
114
|
-
patient_uuid: StrictStr,
|
|
115
|
-
_request_timeout: Union[
|
|
116
|
-
None,
|
|
117
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
-
Tuple[
|
|
119
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
121
|
-
]
|
|
122
|
-
] = None,
|
|
123
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
-
_content_type: Optional[StrictStr] = None,
|
|
125
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
126
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
127
|
-
) -> ApiResponse[Patient]:
|
|
128
|
-
"""Get patient by uuid
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
:param patient_uuid: (required)
|
|
132
|
-
:type patient_uuid: str
|
|
133
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
134
|
-
number provided, it will be total request
|
|
135
|
-
timeout. It can also be a pair (tuple) of
|
|
136
|
-
(connection, read) timeouts.
|
|
137
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
138
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
139
|
-
request; this effectively ignores the
|
|
140
|
-
authentication in the spec for a single request.
|
|
141
|
-
:type _request_auth: dict, optional
|
|
142
|
-
:param _content_type: force content-type for the request.
|
|
143
|
-
:type _content_type: str, Optional
|
|
144
|
-
:param _headers: set to override the headers for a single
|
|
145
|
-
request; this effectively ignores the headers
|
|
146
|
-
in the spec for a single request.
|
|
147
|
-
:type _headers: dict, optional
|
|
148
|
-
:param _host_index: set to override the host_index for a single
|
|
149
|
-
request; this effectively ignores the host_index
|
|
150
|
-
in the spec for a single request.
|
|
151
|
-
:type _host_index: int, optional
|
|
152
|
-
:return: Returns the result object.
|
|
153
|
-
""" # noqa: E501
|
|
154
|
-
|
|
155
|
-
_param = self._get_patient_serialize(
|
|
156
|
-
patient_uuid=patient_uuid,
|
|
157
|
-
_request_auth=_request_auth,
|
|
158
|
-
_content_type=_content_type,
|
|
159
|
-
_headers=_headers,
|
|
160
|
-
_host_index=_host_index
|
|
161
|
-
)
|
|
162
|
-
|
|
163
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
164
|
-
'200': "Patient",
|
|
165
|
-
'404': None,
|
|
166
|
-
}
|
|
167
|
-
response_data = self.api_client.call_api(
|
|
168
|
-
*_param,
|
|
169
|
-
_request_timeout=_request_timeout
|
|
170
|
-
)
|
|
171
|
-
response_data.read()
|
|
172
|
-
return self.api_client.response_deserialize(
|
|
173
|
-
response_data=response_data,
|
|
174
|
-
response_types_map=_response_types_map,
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
@validate_call
|
|
179
|
-
def get_patient_without_preload_content(
|
|
180
|
-
self,
|
|
181
|
-
patient_uuid: StrictStr,
|
|
182
|
-
_request_timeout: Union[
|
|
183
|
-
None,
|
|
184
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
185
|
-
Tuple[
|
|
186
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
187
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
188
|
-
]
|
|
189
|
-
] = None,
|
|
190
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
191
|
-
_content_type: Optional[StrictStr] = None,
|
|
192
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
193
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
194
|
-
) -> RESTResponseType:
|
|
195
|
-
"""Get patient by uuid
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
:param patient_uuid: (required)
|
|
199
|
-
:type patient_uuid: str
|
|
200
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
201
|
-
number provided, it will be total request
|
|
202
|
-
timeout. It can also be a pair (tuple) of
|
|
203
|
-
(connection, read) timeouts.
|
|
204
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
205
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
206
|
-
request; this effectively ignores the
|
|
207
|
-
authentication in the spec for a single request.
|
|
208
|
-
:type _request_auth: dict, optional
|
|
209
|
-
:param _content_type: force content-type for the request.
|
|
210
|
-
:type _content_type: str, Optional
|
|
211
|
-
:param _headers: set to override the headers for a single
|
|
212
|
-
request; this effectively ignores the headers
|
|
213
|
-
in the spec for a single request.
|
|
214
|
-
:type _headers: dict, optional
|
|
215
|
-
:param _host_index: set to override the host_index for a single
|
|
216
|
-
request; this effectively ignores the host_index
|
|
217
|
-
in the spec for a single request.
|
|
218
|
-
:type _host_index: int, optional
|
|
219
|
-
:return: Returns the result object.
|
|
220
|
-
""" # noqa: E501
|
|
221
|
-
|
|
222
|
-
_param = self._get_patient_serialize(
|
|
223
|
-
patient_uuid=patient_uuid,
|
|
224
|
-
_request_auth=_request_auth,
|
|
225
|
-
_content_type=_content_type,
|
|
226
|
-
_headers=_headers,
|
|
227
|
-
_host_index=_host_index
|
|
228
|
-
)
|
|
229
|
-
|
|
230
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
231
|
-
'200': "Patient",
|
|
232
|
-
'404': None,
|
|
233
|
-
}
|
|
234
|
-
response_data = self.api_client.call_api(
|
|
235
|
-
*_param,
|
|
236
|
-
_request_timeout=_request_timeout
|
|
237
|
-
)
|
|
238
|
-
return response_data.response
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
def _get_patient_serialize(
|
|
242
|
-
self,
|
|
243
|
-
patient_uuid,
|
|
244
|
-
_request_auth,
|
|
245
|
-
_content_type,
|
|
246
|
-
_headers,
|
|
247
|
-
_host_index,
|
|
248
|
-
) -> RequestSerialized:
|
|
249
|
-
|
|
250
|
-
_host = None
|
|
251
|
-
|
|
252
|
-
_collection_formats: Dict[str, str] = {
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
_path_params: Dict[str, str] = {}
|
|
256
|
-
_query_params: List[Tuple[str, str]] = []
|
|
257
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
258
|
-
_form_params: List[Tuple[str, str]] = []
|
|
259
|
-
_files: Dict[
|
|
260
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
261
|
-
] = {}
|
|
262
|
-
_body_params: Optional[bytes] = None
|
|
263
|
-
|
|
264
|
-
# process the path parameters
|
|
265
|
-
if patient_uuid is not None:
|
|
266
|
-
_path_params['patient_uuid'] = patient_uuid
|
|
267
|
-
# process the query parameters
|
|
268
|
-
# process the header parameters
|
|
269
|
-
# process the form parameters
|
|
270
|
-
# process the body parameter
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
# set the HTTP header `Accept`
|
|
274
|
-
if 'Accept' not in _header_params:
|
|
275
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
276
|
-
[
|
|
277
|
-
'application/json'
|
|
278
|
-
]
|
|
279
|
-
)
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
# authentication setting
|
|
283
|
-
_auth_settings: List[str] = [
|
|
284
|
-
'opaque_token'
|
|
285
|
-
]
|
|
286
|
-
|
|
287
|
-
return self.api_client.param_serialize(
|
|
288
|
-
method='GET',
|
|
289
|
-
resource_path='/p2rx/1/patients/{patient_uuid}',
|
|
290
|
-
path_params=_path_params,
|
|
291
|
-
query_params=_query_params,
|
|
292
|
-
header_params=_header_params,
|
|
293
|
-
body=_body_params,
|
|
294
|
-
post_params=_form_params,
|
|
295
|
-
files=_files,
|
|
296
|
-
auth_settings=_auth_settings,
|
|
297
|
-
collection_formats=_collection_formats,
|
|
298
|
-
_host=_host,
|
|
299
|
-
_request_auth=_request_auth
|
|
300
|
-
)
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
@validate_call
|
|
306
|
-
def get_patient_pharmacies(
|
|
307
|
-
self,
|
|
308
|
-
patient_uuid: StrictStr,
|
|
309
|
-
distance: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Distance in miles to search for pharmacies")] = None,
|
|
310
|
-
networks: Annotated[Optional[List[StrictStr]], Field(description="Filter pharmacies by network(s) using the codes")] = None,
|
|
311
|
-
page: Optional[StrictInt] = None,
|
|
312
|
-
results_per_page: Optional[StrictInt] = None,
|
|
313
|
-
_request_timeout: Union[
|
|
314
|
-
None,
|
|
315
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
316
|
-
Tuple[
|
|
317
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
318
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
319
|
-
]
|
|
320
|
-
] = None,
|
|
321
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
322
|
-
_content_type: Optional[StrictStr] = None,
|
|
323
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
324
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
325
|
-
) -> List[Pharmacy]:
|
|
326
|
-
"""Get pharmacies near a patient
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
:param patient_uuid: (required)
|
|
330
|
-
:type patient_uuid: str
|
|
331
|
-
:param distance: Distance in miles to search for pharmacies
|
|
332
|
-
:type distance: float
|
|
333
|
-
:param networks: Filter pharmacies by network(s) using the codes
|
|
334
|
-
:type networks: List[str]
|
|
335
|
-
:param page:
|
|
336
|
-
:type page: int
|
|
337
|
-
:param results_per_page:
|
|
338
|
-
:type results_per_page: int
|
|
339
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
340
|
-
number provided, it will be total request
|
|
341
|
-
timeout. It can also be a pair (tuple) of
|
|
342
|
-
(connection, read) timeouts.
|
|
343
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
344
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
345
|
-
request; this effectively ignores the
|
|
346
|
-
authentication in the spec for a single request.
|
|
347
|
-
:type _request_auth: dict, optional
|
|
348
|
-
:param _content_type: force content-type for the request.
|
|
349
|
-
:type _content_type: str, Optional
|
|
350
|
-
:param _headers: set to override the headers for a single
|
|
351
|
-
request; this effectively ignores the headers
|
|
352
|
-
in the spec for a single request.
|
|
353
|
-
:type _headers: dict, optional
|
|
354
|
-
:param _host_index: set to override the host_index for a single
|
|
355
|
-
request; this effectively ignores the host_index
|
|
356
|
-
in the spec for a single request.
|
|
357
|
-
:type _host_index: int, optional
|
|
358
|
-
:return: Returns the result object.
|
|
359
|
-
""" # noqa: E501
|
|
360
|
-
|
|
361
|
-
_param = self._get_patient_pharmacies_serialize(
|
|
362
|
-
patient_uuid=patient_uuid,
|
|
363
|
-
distance=distance,
|
|
364
|
-
networks=networks,
|
|
365
|
-
page=page,
|
|
366
|
-
results_per_page=results_per_page,
|
|
367
|
-
_request_auth=_request_auth,
|
|
368
|
-
_content_type=_content_type,
|
|
369
|
-
_headers=_headers,
|
|
370
|
-
_host_index=_host_index
|
|
371
|
-
)
|
|
372
|
-
|
|
373
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
374
|
-
'200': "List[Pharmacy]",
|
|
375
|
-
'404': None,
|
|
376
|
-
}
|
|
377
|
-
response_data = self.api_client.call_api(
|
|
378
|
-
*_param,
|
|
379
|
-
_request_timeout=_request_timeout
|
|
380
|
-
)
|
|
381
|
-
response_data.read()
|
|
382
|
-
return self.api_client.response_deserialize(
|
|
383
|
-
response_data=response_data,
|
|
384
|
-
response_types_map=_response_types_map,
|
|
385
|
-
).data
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
@validate_call
|
|
389
|
-
def get_patient_pharmacies_with_http_info(
|
|
390
|
-
self,
|
|
391
|
-
patient_uuid: StrictStr,
|
|
392
|
-
distance: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Distance in miles to search for pharmacies")] = None,
|
|
393
|
-
networks: Annotated[Optional[List[StrictStr]], Field(description="Filter pharmacies by network(s) using the codes")] = None,
|
|
394
|
-
page: Optional[StrictInt] = None,
|
|
395
|
-
results_per_page: Optional[StrictInt] = None,
|
|
396
|
-
_request_timeout: Union[
|
|
397
|
-
None,
|
|
398
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
399
|
-
Tuple[
|
|
400
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
401
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
402
|
-
]
|
|
403
|
-
] = None,
|
|
404
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
405
|
-
_content_type: Optional[StrictStr] = None,
|
|
406
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
407
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
408
|
-
) -> ApiResponse[List[Pharmacy]]:
|
|
409
|
-
"""Get pharmacies near a patient
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
:param patient_uuid: (required)
|
|
413
|
-
:type patient_uuid: str
|
|
414
|
-
:param distance: Distance in miles to search for pharmacies
|
|
415
|
-
:type distance: float
|
|
416
|
-
:param networks: Filter pharmacies by network(s) using the codes
|
|
417
|
-
:type networks: List[str]
|
|
418
|
-
:param page:
|
|
419
|
-
:type page: int
|
|
420
|
-
:param results_per_page:
|
|
421
|
-
:type results_per_page: int
|
|
422
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
423
|
-
number provided, it will be total request
|
|
424
|
-
timeout. It can also be a pair (tuple) of
|
|
425
|
-
(connection, read) timeouts.
|
|
426
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
427
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
428
|
-
request; this effectively ignores the
|
|
429
|
-
authentication in the spec for a single request.
|
|
430
|
-
:type _request_auth: dict, optional
|
|
431
|
-
:param _content_type: force content-type for the request.
|
|
432
|
-
:type _content_type: str, Optional
|
|
433
|
-
:param _headers: set to override the headers for a single
|
|
434
|
-
request; this effectively ignores the headers
|
|
435
|
-
in the spec for a single request.
|
|
436
|
-
:type _headers: dict, optional
|
|
437
|
-
:param _host_index: set to override the host_index for a single
|
|
438
|
-
request; this effectively ignores the host_index
|
|
439
|
-
in the spec for a single request.
|
|
440
|
-
:type _host_index: int, optional
|
|
441
|
-
:return: Returns the result object.
|
|
442
|
-
""" # noqa: E501
|
|
443
|
-
|
|
444
|
-
_param = self._get_patient_pharmacies_serialize(
|
|
445
|
-
patient_uuid=patient_uuid,
|
|
446
|
-
distance=distance,
|
|
447
|
-
networks=networks,
|
|
448
|
-
page=page,
|
|
449
|
-
results_per_page=results_per_page,
|
|
450
|
-
_request_auth=_request_auth,
|
|
451
|
-
_content_type=_content_type,
|
|
452
|
-
_headers=_headers,
|
|
453
|
-
_host_index=_host_index
|
|
454
|
-
)
|
|
455
|
-
|
|
456
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
457
|
-
'200': "List[Pharmacy]",
|
|
458
|
-
'404': None,
|
|
459
|
-
}
|
|
460
|
-
response_data = self.api_client.call_api(
|
|
461
|
-
*_param,
|
|
462
|
-
_request_timeout=_request_timeout
|
|
463
|
-
)
|
|
464
|
-
response_data.read()
|
|
465
|
-
return self.api_client.response_deserialize(
|
|
466
|
-
response_data=response_data,
|
|
467
|
-
response_types_map=_response_types_map,
|
|
468
|
-
)
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
@validate_call
|
|
472
|
-
def get_patient_pharmacies_without_preload_content(
|
|
473
|
-
self,
|
|
474
|
-
patient_uuid: StrictStr,
|
|
475
|
-
distance: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Distance in miles to search for pharmacies")] = None,
|
|
476
|
-
networks: Annotated[Optional[List[StrictStr]], Field(description="Filter pharmacies by network(s) using the codes")] = None,
|
|
477
|
-
page: Optional[StrictInt] = None,
|
|
478
|
-
results_per_page: Optional[StrictInt] = None,
|
|
479
|
-
_request_timeout: Union[
|
|
480
|
-
None,
|
|
481
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
482
|
-
Tuple[
|
|
483
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
484
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
485
|
-
]
|
|
486
|
-
] = None,
|
|
487
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
488
|
-
_content_type: Optional[StrictStr] = None,
|
|
489
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
490
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
491
|
-
) -> RESTResponseType:
|
|
492
|
-
"""Get pharmacies near a patient
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
:param patient_uuid: (required)
|
|
496
|
-
:type patient_uuid: str
|
|
497
|
-
:param distance: Distance in miles to search for pharmacies
|
|
498
|
-
:type distance: float
|
|
499
|
-
:param networks: Filter pharmacies by network(s) using the codes
|
|
500
|
-
:type networks: List[str]
|
|
501
|
-
:param page:
|
|
502
|
-
:type page: int
|
|
503
|
-
:param results_per_page:
|
|
504
|
-
:type results_per_page: int
|
|
505
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
506
|
-
number provided, it will be total request
|
|
507
|
-
timeout. It can also be a pair (tuple) of
|
|
508
|
-
(connection, read) timeouts.
|
|
509
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
510
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
511
|
-
request; this effectively ignores the
|
|
512
|
-
authentication in the spec for a single request.
|
|
513
|
-
:type _request_auth: dict, optional
|
|
514
|
-
:param _content_type: force content-type for the request.
|
|
515
|
-
:type _content_type: str, Optional
|
|
516
|
-
:param _headers: set to override the headers for a single
|
|
517
|
-
request; this effectively ignores the headers
|
|
518
|
-
in the spec for a single request.
|
|
519
|
-
:type _headers: dict, optional
|
|
520
|
-
:param _host_index: set to override the host_index for a single
|
|
521
|
-
request; this effectively ignores the host_index
|
|
522
|
-
in the spec for a single request.
|
|
523
|
-
:type _host_index: int, optional
|
|
524
|
-
:return: Returns the result object.
|
|
525
|
-
""" # noqa: E501
|
|
526
|
-
|
|
527
|
-
_param = self._get_patient_pharmacies_serialize(
|
|
528
|
-
patient_uuid=patient_uuid,
|
|
529
|
-
distance=distance,
|
|
530
|
-
networks=networks,
|
|
531
|
-
page=page,
|
|
532
|
-
results_per_page=results_per_page,
|
|
533
|
-
_request_auth=_request_auth,
|
|
534
|
-
_content_type=_content_type,
|
|
535
|
-
_headers=_headers,
|
|
536
|
-
_host_index=_host_index
|
|
537
|
-
)
|
|
538
|
-
|
|
539
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
540
|
-
'200': "List[Pharmacy]",
|
|
541
|
-
'404': None,
|
|
542
|
-
}
|
|
543
|
-
response_data = self.api_client.call_api(
|
|
544
|
-
*_param,
|
|
545
|
-
_request_timeout=_request_timeout
|
|
546
|
-
)
|
|
547
|
-
return response_data.response
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
def _get_patient_pharmacies_serialize(
|
|
551
|
-
self,
|
|
552
|
-
patient_uuid,
|
|
553
|
-
distance,
|
|
554
|
-
networks,
|
|
555
|
-
page,
|
|
556
|
-
results_per_page,
|
|
557
|
-
_request_auth,
|
|
558
|
-
_content_type,
|
|
559
|
-
_headers,
|
|
560
|
-
_host_index,
|
|
561
|
-
) -> RequestSerialized:
|
|
562
|
-
|
|
563
|
-
_host = None
|
|
564
|
-
|
|
565
|
-
_collection_formats: Dict[str, str] = {
|
|
566
|
-
'networks': 'csv',
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
_path_params: Dict[str, str] = {}
|
|
570
|
-
_query_params: List[Tuple[str, str]] = []
|
|
571
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
572
|
-
_form_params: List[Tuple[str, str]] = []
|
|
573
|
-
_files: Dict[
|
|
574
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
575
|
-
] = {}
|
|
576
|
-
_body_params: Optional[bytes] = None
|
|
577
|
-
|
|
578
|
-
# process the path parameters
|
|
579
|
-
if patient_uuid is not None:
|
|
580
|
-
_path_params['patient_uuid'] = patient_uuid
|
|
581
|
-
# process the query parameters
|
|
582
|
-
if distance is not None:
|
|
583
|
-
|
|
584
|
-
_query_params.append(('distance', distance))
|
|
585
|
-
|
|
586
|
-
if networks is not None:
|
|
587
|
-
|
|
588
|
-
_query_params.append(('networks', networks))
|
|
589
|
-
|
|
590
|
-
if page is not None:
|
|
591
|
-
|
|
592
|
-
_query_params.append(('page', page))
|
|
593
|
-
|
|
594
|
-
if results_per_page is not None:
|
|
595
|
-
|
|
596
|
-
_query_params.append(('results_per_page', results_per_page))
|
|
597
|
-
|
|
598
|
-
# process the header parameters
|
|
599
|
-
# process the form parameters
|
|
600
|
-
# process the body parameter
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
# set the HTTP header `Accept`
|
|
604
|
-
if 'Accept' not in _header_params:
|
|
605
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
606
|
-
[
|
|
607
|
-
'application/json'
|
|
608
|
-
]
|
|
609
|
-
)
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
# authentication setting
|
|
613
|
-
_auth_settings: List[str] = [
|
|
614
|
-
'opaque_token'
|
|
615
|
-
]
|
|
616
|
-
|
|
617
|
-
return self.api_client.param_serialize(
|
|
618
|
-
method='GET',
|
|
619
|
-
resource_path='/p2rx/1/patients/{patient_uuid}/pharmacies',
|
|
620
|
-
path_params=_path_params,
|
|
621
|
-
query_params=_query_params,
|
|
622
|
-
header_params=_header_params,
|
|
623
|
-
body=_body_params,
|
|
624
|
-
post_params=_form_params,
|
|
625
|
-
files=_files,
|
|
626
|
-
auth_settings=_auth_settings,
|
|
627
|
-
collection_formats=_collection_formats,
|
|
628
|
-
_host=_host,
|
|
629
|
-
_request_auth=_request_auth
|
|
630
|
-
)
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
@validate_call
|
|
636
|
-
def get_patients(
|
|
637
|
-
self,
|
|
638
|
-
q: Annotated[Optional[StrictStr], Field(description="Filter patients by query. This takes precedence if set over remaining filters.")] = None,
|
|
639
|
-
external_id: Annotated[Optional[StrictStr], Field(description="An external id to find the patient by. Format is {slug}:{external_id}. This takes precedence if set over remaining filters, but not used if q is set.")] = None,
|
|
640
|
-
uuid_list: Annotated[Optional[List[StrictStr]], Field(description="A list of uuid strings to filter by. Only used if q and external_id are not set.")] = None,
|
|
641
|
-
page: Optional[StrictInt] = None,
|
|
642
|
-
results_per_page: Optional[StrictInt] = None,
|
|
643
|
-
deep: Optional[StrictBool] = None,
|
|
644
|
-
_request_timeout: Union[
|
|
645
|
-
None,
|
|
646
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
647
|
-
Tuple[
|
|
648
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
649
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
650
|
-
]
|
|
651
|
-
] = None,
|
|
652
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
653
|
-
_content_type: Optional[StrictStr] = None,
|
|
654
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
655
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
656
|
-
) -> List[Patient]:
|
|
657
|
-
"""Get all patients
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
:param q: Filter patients by query. This takes precedence if set over remaining filters.
|
|
661
|
-
:type q: str
|
|
662
|
-
:param external_id: An external id to find the patient by. Format is {slug}:{external_id}. This takes precedence if set over remaining filters, but not used if q is set.
|
|
663
|
-
:type external_id: str
|
|
664
|
-
:param uuid_list: A list of uuid strings to filter by. Only used if q and external_id are not set.
|
|
665
|
-
:type uuid_list: List[str]
|
|
666
|
-
:param page:
|
|
667
|
-
:type page: int
|
|
668
|
-
:param results_per_page:
|
|
669
|
-
:type results_per_page: int
|
|
670
|
-
:param deep:
|
|
671
|
-
:type deep: bool
|
|
672
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
673
|
-
number provided, it will be total request
|
|
674
|
-
timeout. It can also be a pair (tuple) of
|
|
675
|
-
(connection, read) timeouts.
|
|
676
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
677
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
678
|
-
request; this effectively ignores the
|
|
679
|
-
authentication in the spec for a single request.
|
|
680
|
-
:type _request_auth: dict, optional
|
|
681
|
-
:param _content_type: force content-type for the request.
|
|
682
|
-
:type _content_type: str, Optional
|
|
683
|
-
:param _headers: set to override the headers for a single
|
|
684
|
-
request; this effectively ignores the headers
|
|
685
|
-
in the spec for a single request.
|
|
686
|
-
:type _headers: dict, optional
|
|
687
|
-
:param _host_index: set to override the host_index for a single
|
|
688
|
-
request; this effectively ignores the host_index
|
|
689
|
-
in the spec for a single request.
|
|
690
|
-
:type _host_index: int, optional
|
|
691
|
-
:return: Returns the result object.
|
|
692
|
-
""" # noqa: E501
|
|
693
|
-
|
|
694
|
-
_param = self._get_patients_serialize(
|
|
695
|
-
q=q,
|
|
696
|
-
external_id=external_id,
|
|
697
|
-
uuid_list=uuid_list,
|
|
698
|
-
page=page,
|
|
699
|
-
results_per_page=results_per_page,
|
|
700
|
-
deep=deep,
|
|
701
|
-
_request_auth=_request_auth,
|
|
702
|
-
_content_type=_content_type,
|
|
703
|
-
_headers=_headers,
|
|
704
|
-
_host_index=_host_index
|
|
705
|
-
)
|
|
706
|
-
|
|
707
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
708
|
-
'200': "List[Patient]",
|
|
709
|
-
'404': None,
|
|
710
|
-
}
|
|
711
|
-
response_data = self.api_client.call_api(
|
|
712
|
-
*_param,
|
|
713
|
-
_request_timeout=_request_timeout
|
|
714
|
-
)
|
|
715
|
-
response_data.read()
|
|
716
|
-
return self.api_client.response_deserialize(
|
|
717
|
-
response_data=response_data,
|
|
718
|
-
response_types_map=_response_types_map,
|
|
719
|
-
).data
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
@validate_call
|
|
723
|
-
def get_patients_with_http_info(
|
|
724
|
-
self,
|
|
725
|
-
q: Annotated[Optional[StrictStr], Field(description="Filter patients by query. This takes precedence if set over remaining filters.")] = None,
|
|
726
|
-
external_id: Annotated[Optional[StrictStr], Field(description="An external id to find the patient by. Format is {slug}:{external_id}. This takes precedence if set over remaining filters, but not used if q is set.")] = None,
|
|
727
|
-
uuid_list: Annotated[Optional[List[StrictStr]], Field(description="A list of uuid strings to filter by. Only used if q and external_id are not set.")] = None,
|
|
728
|
-
page: Optional[StrictInt] = None,
|
|
729
|
-
results_per_page: Optional[StrictInt] = None,
|
|
730
|
-
deep: Optional[StrictBool] = None,
|
|
731
|
-
_request_timeout: Union[
|
|
732
|
-
None,
|
|
733
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
734
|
-
Tuple[
|
|
735
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
736
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
737
|
-
]
|
|
738
|
-
] = None,
|
|
739
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
740
|
-
_content_type: Optional[StrictStr] = None,
|
|
741
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
742
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
743
|
-
) -> ApiResponse[List[Patient]]:
|
|
744
|
-
"""Get all patients
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
:param q: Filter patients by query. This takes precedence if set over remaining filters.
|
|
748
|
-
:type q: str
|
|
749
|
-
:param external_id: An external id to find the patient by. Format is {slug}:{external_id}. This takes precedence if set over remaining filters, but not used if q is set.
|
|
750
|
-
:type external_id: str
|
|
751
|
-
:param uuid_list: A list of uuid strings to filter by. Only used if q and external_id are not set.
|
|
752
|
-
:type uuid_list: List[str]
|
|
753
|
-
:param page:
|
|
754
|
-
:type page: int
|
|
755
|
-
:param results_per_page:
|
|
756
|
-
:type results_per_page: int
|
|
757
|
-
:param deep:
|
|
758
|
-
:type deep: bool
|
|
759
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
760
|
-
number provided, it will be total request
|
|
761
|
-
timeout. It can also be a pair (tuple) of
|
|
762
|
-
(connection, read) timeouts.
|
|
763
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
764
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
765
|
-
request; this effectively ignores the
|
|
766
|
-
authentication in the spec for a single request.
|
|
767
|
-
:type _request_auth: dict, optional
|
|
768
|
-
:param _content_type: force content-type for the request.
|
|
769
|
-
:type _content_type: str, Optional
|
|
770
|
-
:param _headers: set to override the headers for a single
|
|
771
|
-
request; this effectively ignores the headers
|
|
772
|
-
in the spec for a single request.
|
|
773
|
-
:type _headers: dict, optional
|
|
774
|
-
:param _host_index: set to override the host_index for a single
|
|
775
|
-
request; this effectively ignores the host_index
|
|
776
|
-
in the spec for a single request.
|
|
777
|
-
:type _host_index: int, optional
|
|
778
|
-
:return: Returns the result object.
|
|
779
|
-
""" # noqa: E501
|
|
780
|
-
|
|
781
|
-
_param = self._get_patients_serialize(
|
|
782
|
-
q=q,
|
|
783
|
-
external_id=external_id,
|
|
784
|
-
uuid_list=uuid_list,
|
|
785
|
-
page=page,
|
|
786
|
-
results_per_page=results_per_page,
|
|
787
|
-
deep=deep,
|
|
788
|
-
_request_auth=_request_auth,
|
|
789
|
-
_content_type=_content_type,
|
|
790
|
-
_headers=_headers,
|
|
791
|
-
_host_index=_host_index
|
|
792
|
-
)
|
|
793
|
-
|
|
794
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
795
|
-
'200': "List[Patient]",
|
|
796
|
-
'404': None,
|
|
797
|
-
}
|
|
798
|
-
response_data = self.api_client.call_api(
|
|
799
|
-
*_param,
|
|
800
|
-
_request_timeout=_request_timeout
|
|
801
|
-
)
|
|
802
|
-
response_data.read()
|
|
803
|
-
return self.api_client.response_deserialize(
|
|
804
|
-
response_data=response_data,
|
|
805
|
-
response_types_map=_response_types_map,
|
|
806
|
-
)
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
@validate_call
|
|
810
|
-
def get_patients_without_preload_content(
|
|
811
|
-
self,
|
|
812
|
-
q: Annotated[Optional[StrictStr], Field(description="Filter patients by query. This takes precedence if set over remaining filters.")] = None,
|
|
813
|
-
external_id: Annotated[Optional[StrictStr], Field(description="An external id to find the patient by. Format is {slug}:{external_id}. This takes precedence if set over remaining filters, but not used if q is set.")] = None,
|
|
814
|
-
uuid_list: Annotated[Optional[List[StrictStr]], Field(description="A list of uuid strings to filter by. Only used if q and external_id are not set.")] = None,
|
|
815
|
-
page: Optional[StrictInt] = None,
|
|
816
|
-
results_per_page: Optional[StrictInt] = None,
|
|
817
|
-
deep: Optional[StrictBool] = None,
|
|
818
|
-
_request_timeout: Union[
|
|
819
|
-
None,
|
|
820
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
821
|
-
Tuple[
|
|
822
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
823
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
824
|
-
]
|
|
825
|
-
] = None,
|
|
826
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
827
|
-
_content_type: Optional[StrictStr] = None,
|
|
828
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
829
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
830
|
-
) -> RESTResponseType:
|
|
831
|
-
"""Get all patients
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
:param q: Filter patients by query. This takes precedence if set over remaining filters.
|
|
835
|
-
:type q: str
|
|
836
|
-
:param external_id: An external id to find the patient by. Format is {slug}:{external_id}. This takes precedence if set over remaining filters, but not used if q is set.
|
|
837
|
-
:type external_id: str
|
|
838
|
-
:param uuid_list: A list of uuid strings to filter by. Only used if q and external_id are not set.
|
|
839
|
-
:type uuid_list: List[str]
|
|
840
|
-
:param page:
|
|
841
|
-
:type page: int
|
|
842
|
-
:param results_per_page:
|
|
843
|
-
:type results_per_page: int
|
|
844
|
-
:param deep:
|
|
845
|
-
:type deep: bool
|
|
846
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
847
|
-
number provided, it will be total request
|
|
848
|
-
timeout. It can also be a pair (tuple) of
|
|
849
|
-
(connection, read) timeouts.
|
|
850
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
851
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
852
|
-
request; this effectively ignores the
|
|
853
|
-
authentication in the spec for a single request.
|
|
854
|
-
:type _request_auth: dict, optional
|
|
855
|
-
:param _content_type: force content-type for the request.
|
|
856
|
-
:type _content_type: str, Optional
|
|
857
|
-
:param _headers: set to override the headers for a single
|
|
858
|
-
request; this effectively ignores the headers
|
|
859
|
-
in the spec for a single request.
|
|
860
|
-
:type _headers: dict, optional
|
|
861
|
-
:param _host_index: set to override the host_index for a single
|
|
862
|
-
request; this effectively ignores the host_index
|
|
863
|
-
in the spec for a single request.
|
|
864
|
-
:type _host_index: int, optional
|
|
865
|
-
:return: Returns the result object.
|
|
866
|
-
""" # noqa: E501
|
|
867
|
-
|
|
868
|
-
_param = self._get_patients_serialize(
|
|
869
|
-
q=q,
|
|
870
|
-
external_id=external_id,
|
|
871
|
-
uuid_list=uuid_list,
|
|
872
|
-
page=page,
|
|
873
|
-
results_per_page=results_per_page,
|
|
874
|
-
deep=deep,
|
|
875
|
-
_request_auth=_request_auth,
|
|
876
|
-
_content_type=_content_type,
|
|
877
|
-
_headers=_headers,
|
|
878
|
-
_host_index=_host_index
|
|
879
|
-
)
|
|
880
|
-
|
|
881
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
882
|
-
'200': "List[Patient]",
|
|
883
|
-
'404': None,
|
|
884
|
-
}
|
|
885
|
-
response_data = self.api_client.call_api(
|
|
886
|
-
*_param,
|
|
887
|
-
_request_timeout=_request_timeout
|
|
888
|
-
)
|
|
889
|
-
return response_data.response
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
def _get_patients_serialize(
|
|
893
|
-
self,
|
|
894
|
-
q,
|
|
895
|
-
external_id,
|
|
896
|
-
uuid_list,
|
|
897
|
-
page,
|
|
898
|
-
results_per_page,
|
|
899
|
-
deep,
|
|
900
|
-
_request_auth,
|
|
901
|
-
_content_type,
|
|
902
|
-
_headers,
|
|
903
|
-
_host_index,
|
|
904
|
-
) -> RequestSerialized:
|
|
905
|
-
|
|
906
|
-
_host = None
|
|
907
|
-
|
|
908
|
-
_collection_formats: Dict[str, str] = {
|
|
909
|
-
'uuid_list': 'csv',
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
_path_params: Dict[str, str] = {}
|
|
913
|
-
_query_params: List[Tuple[str, str]] = []
|
|
914
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
915
|
-
_form_params: List[Tuple[str, str]] = []
|
|
916
|
-
_files: Dict[
|
|
917
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
918
|
-
] = {}
|
|
919
|
-
_body_params: Optional[bytes] = None
|
|
920
|
-
|
|
921
|
-
# process the path parameters
|
|
922
|
-
# process the query parameters
|
|
923
|
-
if q is not None:
|
|
924
|
-
|
|
925
|
-
_query_params.append(('q', q))
|
|
926
|
-
|
|
927
|
-
if external_id is not None:
|
|
928
|
-
|
|
929
|
-
_query_params.append(('external_id', external_id))
|
|
930
|
-
|
|
931
|
-
if uuid_list is not None:
|
|
932
|
-
|
|
933
|
-
_query_params.append(('uuid_list', uuid_list))
|
|
934
|
-
|
|
935
|
-
if page is not None:
|
|
936
|
-
|
|
937
|
-
_query_params.append(('page', page))
|
|
938
|
-
|
|
939
|
-
if results_per_page is not None:
|
|
940
|
-
|
|
941
|
-
_query_params.append(('results_per_page', results_per_page))
|
|
942
|
-
|
|
943
|
-
if deep is not None:
|
|
944
|
-
|
|
945
|
-
_query_params.append(('deep', deep))
|
|
946
|
-
|
|
947
|
-
# process the header parameters
|
|
948
|
-
# process the form parameters
|
|
949
|
-
# process the body parameter
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
# set the HTTP header `Accept`
|
|
953
|
-
if 'Accept' not in _header_params:
|
|
954
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
955
|
-
[
|
|
956
|
-
'application/json'
|
|
957
|
-
]
|
|
958
|
-
)
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
# authentication setting
|
|
962
|
-
_auth_settings: List[str] = [
|
|
963
|
-
'opaque_token'
|
|
964
|
-
]
|
|
965
|
-
|
|
966
|
-
return self.api_client.param_serialize(
|
|
967
|
-
method='GET',
|
|
968
|
-
resource_path='/p2rx/1/patients',
|
|
969
|
-
path_params=_path_params,
|
|
970
|
-
query_params=_query_params,
|
|
971
|
-
header_params=_header_params,
|
|
972
|
-
body=_body_params,
|
|
973
|
-
post_params=_form_params,
|
|
974
|
-
files=_files,
|
|
975
|
-
auth_settings=_auth_settings,
|
|
976
|
-
collection_formats=_collection_formats,
|
|
977
|
-
_host=_host,
|
|
978
|
-
_request_auth=_request_auth
|
|
979
|
-
)
|
|
980
|
-
|
|
981
|
-
|