rxfoundry.clients.swifty-api 0.0.652__py3-none-any.whl → 0.1.1009__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/__init__.py +38 -3
- rxfoundry/clients/swifty_api/api/__init__.py +3 -1
- rxfoundry/clients/swifty_api/api/async_api.py +2336 -52
- rxfoundry/clients/swifty_api/api/code_api.py +281 -0
- rxfoundry/clients/swifty_api/api/default_api.py +318 -0
- rxfoundry/clients/swifty_api/api/medication_api.py +647 -51
- rxfoundry/clients/swifty_api/api/patient_api.py +1429 -49
- rxfoundry/clients/swifty_api/api/pharmacist_api.py +24 -24
- rxfoundry/clients/swifty_api/api/pharmacy_api.py +48 -48
- rxfoundry/clients/swifty_api/api/prescriber_api.py +24 -24
- rxfoundry/clients/swifty_api/api/prescription_api.py +934 -130
- rxfoundry/clients/swifty_api/api/task_api.py +1835 -0
- rxfoundry/clients/swifty_api/api/tasks_api.py +374 -0
- rxfoundry/clients/swifty_api/api/validation_api.py +311 -0
- rxfoundry/clients/swifty_api/api/virtual_pharmacy_api.py +262 -0
- rxfoundry/clients/swifty_api/api/workflow_api.py +633 -0
- rxfoundry/clients/swifty_api/models/__init__.py +35 -2
- rxfoundry/clients/swifty_api/models/address.py +11 -10
- rxfoundry/clients/swifty_api/models/code_type.py +92 -0
- rxfoundry/clients/swifty_api/models/create_patient_request.py +98 -0
- rxfoundry/clients/swifty_api/models/formulary.py +96 -0
- rxfoundry/clients/swifty_api/models/insurance.py +96 -0
- rxfoundry/clients/swifty_api/models/medication_instruction.py +92 -0
- rxfoundry/clients/swifty_api/models/medication_ref.py +100 -0
- rxfoundry/clients/swifty_api/models/patient.py +88 -3
- rxfoundry/clients/swifty_api/models/patient_activity_data.py +169 -0
- rxfoundry/clients/swifty_api/models/patient_activity_message.py +112 -0
- rxfoundry/clients/swifty_api/models/patient_activity_notification.py +9 -17
- rxfoundry/clients/swifty_api/models/patient_activity_notification_activity_data.py +39 -8
- rxfoundry/clients/swifty_api/models/patient_address_activity_notification.py +105 -0
- rxfoundry/clients/swifty_api/models/patient_address_data.py +26 -10
- rxfoundry/clients/swifty_api/models/patient_allergy.py +92 -0
- rxfoundry/clients/swifty_api/models/patient_condition.py +92 -0
- rxfoundry/clients/swifty_api/models/patient_data.py +13 -2
- rxfoundry/clients/swifty_api/models/patient_external_identifier.py +6 -5
- rxfoundry/clients/swifty_api/models/patient_health_profile_data.py +127 -0
- rxfoundry/clients/swifty_api/models/patient_insurance.py +106 -0
- rxfoundry/clients/swifty_api/models/patient_insurance_data.py +105 -0
- rxfoundry/clients/swifty_api/models/patient_medication.py +92 -0
- rxfoundry/clients/swifty_api/models/patient_name.py +99 -0
- rxfoundry/clients/swifty_api/models/patient_name_data.py +108 -0
- rxfoundry/clients/swifty_api/models/patient_phone_number.py +89 -0
- rxfoundry/clients/swifty_api/models/patient_phone_number_data.py +98 -0
- rxfoundry/clients/swifty_api/models/patient_task.py +115 -0
- rxfoundry/clients/swifty_api/models/patient_task_status.py +105 -0
- rxfoundry/clients/swifty_api/models/patient_task_type.py +45 -0
- rxfoundry/clients/swifty_api/models/prescription.py +35 -30
- rxfoundry/clients/swifty_api/models/prescription_change_request.py +24 -36
- rxfoundry/clients/swifty_api/models/prescription_change_request_and_response.py +145 -0
- rxfoundry/clients/swifty_api/models/prescription_change_request_response.py +134 -0
- rxfoundry/clients/swifty_api/models/prescription_data.py +126 -0
- rxfoundry/clients/swifty_api/models/prescription_message.py +100 -0
- rxfoundry/clients/swifty_api/models/prescription_message_task.py +109 -0
- rxfoundry/clients/swifty_api/models/prescription_message_task_status.py +99 -0
- rxfoundry/clients/swifty_api/models/prescription_message_task_type.py +43 -0
- rxfoundry/clients/swifty_api/models/prescription_message_type.py +53 -0
- rxfoundry/clients/swifty_api/models/prescription_patch.py +6 -2
- rxfoundry/clients/swifty_api/models/prescription_status_type.py +40 -0
- rxfoundry/clients/swifty_api/models/prescription_task.py +14 -12
- rxfoundry/clients/swifty_api/models/prescription_task_status.py +6 -2
- rxfoundry/clients/swifty_api/models/prescription_task_type.py +42 -0
- rxfoundry/clients/swifty_api/models/prescription_transfer_request_and_response.py +145 -0
- rxfoundry/clients/swifty_api/models/prescription_transfer_request_response.py +128 -0
- rxfoundry/clients/swifty_api/models/status_type.py +92 -0
- rxfoundry/clients/swifty_api/models/workflow.py +108 -0
- rxfoundry/clients/swifty_api/models/workflow_sub_task.py +96 -0
- rxfoundry/clients/swifty_api/models/workflow_sub_task_sub_task.py +155 -0
- rxfoundry/clients/swifty_api/models/workflow_task.py +111 -0
- rxfoundry/clients/swifty_api/models/workflow_task_task.py +155 -0
- rxfoundry/clients/swifty_api/models/workflow_type.py +55 -0
- {rxfoundry_clients_swifty_api-0.0.652.dist-info → rxfoundry_clients_swifty_api-0.1.1009.dist-info}/METADATA +1 -1
- rxfoundry_clients_swifty_api-0.1.1009.dist-info/RECORD +110 -0
- {rxfoundry_clients_swifty_api-0.0.652.dist-info → rxfoundry_clients_swifty_api-0.1.1009.dist-info}/WHEEL +1 -1
- rxfoundry_clients_swifty_api-0.0.652.dist-info/RECORD +0 -64
- {rxfoundry_clients_swifty_api-0.0.652.dist-info → rxfoundry_clients_swifty_api-0.1.1009.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX 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 StrictBool, StrictInt
|
|
21
|
+
from typing import List, Optional
|
|
22
|
+
from rxfoundry.clients.swifty_api.models.prescription_message import PrescriptionMessage
|
|
23
|
+
from rxfoundry.clients.swifty_api.models.prescription_message_task_type import PrescriptionMessageTaskType
|
|
24
|
+
|
|
25
|
+
from rxfoundry.clients.swifty_api.api_client import ApiClient, RequestSerialized
|
|
26
|
+
from rxfoundry.clients.swifty_api.api_response import ApiResponse
|
|
27
|
+
from rxfoundry.clients.swifty_api.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class TasksApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@validate_call
|
|
44
|
+
def get_prescription_message_tasks(
|
|
45
|
+
self,
|
|
46
|
+
task_type: Optional[PrescriptionMessageTaskType] = None,
|
|
47
|
+
is_completed: Optional[StrictBool] = None,
|
|
48
|
+
manual_review_required: Optional[StrictBool] = None,
|
|
49
|
+
page: Optional[StrictInt] = None,
|
|
50
|
+
results_per_page: Optional[StrictInt] = None,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> List[PrescriptionMessage]:
|
|
64
|
+
"""gets a list of prescription message tasks
|
|
65
|
+
|
|
66
|
+
gets a list of prescription message tasks
|
|
67
|
+
|
|
68
|
+
:param task_type:
|
|
69
|
+
:type task_type: PrescriptionMessageTaskType
|
|
70
|
+
:param is_completed:
|
|
71
|
+
:type is_completed: bool
|
|
72
|
+
:param manual_review_required:
|
|
73
|
+
:type manual_review_required: bool
|
|
74
|
+
:param page:
|
|
75
|
+
:type page: int
|
|
76
|
+
:param results_per_page:
|
|
77
|
+
:type results_per_page: int
|
|
78
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
79
|
+
number provided, it will be total request
|
|
80
|
+
timeout. It can also be a pair (tuple) of
|
|
81
|
+
(connection, read) timeouts.
|
|
82
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
83
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
84
|
+
request; this effectively ignores the
|
|
85
|
+
authentication in the spec for a single request.
|
|
86
|
+
:type _request_auth: dict, optional
|
|
87
|
+
:param _content_type: force content-type for the request.
|
|
88
|
+
:type _content_type: str, Optional
|
|
89
|
+
:param _headers: set to override the headers for a single
|
|
90
|
+
request; this effectively ignores the headers
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _headers: dict, optional
|
|
93
|
+
:param _host_index: set to override the host_index for a single
|
|
94
|
+
request; this effectively ignores the host_index
|
|
95
|
+
in the spec for a single request.
|
|
96
|
+
:type _host_index: int, optional
|
|
97
|
+
:return: Returns the result object.
|
|
98
|
+
""" # noqa: E501
|
|
99
|
+
|
|
100
|
+
_param = self._get_prescription_message_tasks_serialize(
|
|
101
|
+
task_type=task_type,
|
|
102
|
+
is_completed=is_completed,
|
|
103
|
+
manual_review_required=manual_review_required,
|
|
104
|
+
page=page,
|
|
105
|
+
results_per_page=results_per_page,
|
|
106
|
+
_request_auth=_request_auth,
|
|
107
|
+
_content_type=_content_type,
|
|
108
|
+
_headers=_headers,
|
|
109
|
+
_host_index=_host_index
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
113
|
+
'200': "List[PrescriptionMessage]",
|
|
114
|
+
'404': None,
|
|
115
|
+
}
|
|
116
|
+
response_data = self.api_client.call_api(
|
|
117
|
+
*_param,
|
|
118
|
+
_request_timeout=_request_timeout
|
|
119
|
+
)
|
|
120
|
+
response_data.read()
|
|
121
|
+
return self.api_client.response_deserialize(
|
|
122
|
+
response_data=response_data,
|
|
123
|
+
response_types_map=_response_types_map,
|
|
124
|
+
).data
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
@validate_call
|
|
128
|
+
def get_prescription_message_tasks_with_http_info(
|
|
129
|
+
self,
|
|
130
|
+
task_type: Optional[PrescriptionMessageTaskType] = None,
|
|
131
|
+
is_completed: Optional[StrictBool] = None,
|
|
132
|
+
manual_review_required: Optional[StrictBool] = None,
|
|
133
|
+
page: Optional[StrictInt] = None,
|
|
134
|
+
results_per_page: Optional[StrictInt] = None,
|
|
135
|
+
_request_timeout: Union[
|
|
136
|
+
None,
|
|
137
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
138
|
+
Tuple[
|
|
139
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
140
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
141
|
+
]
|
|
142
|
+
] = None,
|
|
143
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
144
|
+
_content_type: Optional[StrictStr] = None,
|
|
145
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
146
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
147
|
+
) -> ApiResponse[List[PrescriptionMessage]]:
|
|
148
|
+
"""gets a list of prescription message tasks
|
|
149
|
+
|
|
150
|
+
gets a list of prescription message tasks
|
|
151
|
+
|
|
152
|
+
:param task_type:
|
|
153
|
+
:type task_type: PrescriptionMessageTaskType
|
|
154
|
+
:param is_completed:
|
|
155
|
+
:type is_completed: bool
|
|
156
|
+
:param manual_review_required:
|
|
157
|
+
:type manual_review_required: bool
|
|
158
|
+
:param page:
|
|
159
|
+
:type page: int
|
|
160
|
+
:param results_per_page:
|
|
161
|
+
:type results_per_page: int
|
|
162
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
163
|
+
number provided, it will be total request
|
|
164
|
+
timeout. It can also be a pair (tuple) of
|
|
165
|
+
(connection, read) timeouts.
|
|
166
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
167
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
168
|
+
request; this effectively ignores the
|
|
169
|
+
authentication in the spec for a single request.
|
|
170
|
+
:type _request_auth: dict, optional
|
|
171
|
+
:param _content_type: force content-type for the request.
|
|
172
|
+
:type _content_type: str, Optional
|
|
173
|
+
:param _headers: set to override the headers for a single
|
|
174
|
+
request; this effectively ignores the headers
|
|
175
|
+
in the spec for a single request.
|
|
176
|
+
:type _headers: dict, optional
|
|
177
|
+
:param _host_index: set to override the host_index for a single
|
|
178
|
+
request; this effectively ignores the host_index
|
|
179
|
+
in the spec for a single request.
|
|
180
|
+
:type _host_index: int, optional
|
|
181
|
+
:return: Returns the result object.
|
|
182
|
+
""" # noqa: E501
|
|
183
|
+
|
|
184
|
+
_param = self._get_prescription_message_tasks_serialize(
|
|
185
|
+
task_type=task_type,
|
|
186
|
+
is_completed=is_completed,
|
|
187
|
+
manual_review_required=manual_review_required,
|
|
188
|
+
page=page,
|
|
189
|
+
results_per_page=results_per_page,
|
|
190
|
+
_request_auth=_request_auth,
|
|
191
|
+
_content_type=_content_type,
|
|
192
|
+
_headers=_headers,
|
|
193
|
+
_host_index=_host_index
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
197
|
+
'200': "List[PrescriptionMessage]",
|
|
198
|
+
'404': None,
|
|
199
|
+
}
|
|
200
|
+
response_data = self.api_client.call_api(
|
|
201
|
+
*_param,
|
|
202
|
+
_request_timeout=_request_timeout
|
|
203
|
+
)
|
|
204
|
+
response_data.read()
|
|
205
|
+
return self.api_client.response_deserialize(
|
|
206
|
+
response_data=response_data,
|
|
207
|
+
response_types_map=_response_types_map,
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
@validate_call
|
|
212
|
+
def get_prescription_message_tasks_without_preload_content(
|
|
213
|
+
self,
|
|
214
|
+
task_type: Optional[PrescriptionMessageTaskType] = None,
|
|
215
|
+
is_completed: Optional[StrictBool] = None,
|
|
216
|
+
manual_review_required: Optional[StrictBool] = None,
|
|
217
|
+
page: Optional[StrictInt] = None,
|
|
218
|
+
results_per_page: Optional[StrictInt] = None,
|
|
219
|
+
_request_timeout: Union[
|
|
220
|
+
None,
|
|
221
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
222
|
+
Tuple[
|
|
223
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
224
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
225
|
+
]
|
|
226
|
+
] = None,
|
|
227
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
228
|
+
_content_type: Optional[StrictStr] = None,
|
|
229
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
230
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
231
|
+
) -> RESTResponseType:
|
|
232
|
+
"""gets a list of prescription message tasks
|
|
233
|
+
|
|
234
|
+
gets a list of prescription message tasks
|
|
235
|
+
|
|
236
|
+
:param task_type:
|
|
237
|
+
:type task_type: PrescriptionMessageTaskType
|
|
238
|
+
:param is_completed:
|
|
239
|
+
:type is_completed: bool
|
|
240
|
+
:param manual_review_required:
|
|
241
|
+
:type manual_review_required: bool
|
|
242
|
+
:param page:
|
|
243
|
+
:type page: int
|
|
244
|
+
:param results_per_page:
|
|
245
|
+
:type results_per_page: int
|
|
246
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
247
|
+
number provided, it will be total request
|
|
248
|
+
timeout. It can also be a pair (tuple) of
|
|
249
|
+
(connection, read) timeouts.
|
|
250
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
251
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
252
|
+
request; this effectively ignores the
|
|
253
|
+
authentication in the spec for a single request.
|
|
254
|
+
:type _request_auth: dict, optional
|
|
255
|
+
:param _content_type: force content-type for the request.
|
|
256
|
+
:type _content_type: str, Optional
|
|
257
|
+
:param _headers: set to override the headers for a single
|
|
258
|
+
request; this effectively ignores the headers
|
|
259
|
+
in the spec for a single request.
|
|
260
|
+
:type _headers: dict, optional
|
|
261
|
+
:param _host_index: set to override the host_index for a single
|
|
262
|
+
request; this effectively ignores the host_index
|
|
263
|
+
in the spec for a single request.
|
|
264
|
+
:type _host_index: int, optional
|
|
265
|
+
:return: Returns the result object.
|
|
266
|
+
""" # noqa: E501
|
|
267
|
+
|
|
268
|
+
_param = self._get_prescription_message_tasks_serialize(
|
|
269
|
+
task_type=task_type,
|
|
270
|
+
is_completed=is_completed,
|
|
271
|
+
manual_review_required=manual_review_required,
|
|
272
|
+
page=page,
|
|
273
|
+
results_per_page=results_per_page,
|
|
274
|
+
_request_auth=_request_auth,
|
|
275
|
+
_content_type=_content_type,
|
|
276
|
+
_headers=_headers,
|
|
277
|
+
_host_index=_host_index
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
281
|
+
'200': "List[PrescriptionMessage]",
|
|
282
|
+
'404': None,
|
|
283
|
+
}
|
|
284
|
+
response_data = self.api_client.call_api(
|
|
285
|
+
*_param,
|
|
286
|
+
_request_timeout=_request_timeout
|
|
287
|
+
)
|
|
288
|
+
return response_data.response
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
def _get_prescription_message_tasks_serialize(
|
|
292
|
+
self,
|
|
293
|
+
task_type,
|
|
294
|
+
is_completed,
|
|
295
|
+
manual_review_required,
|
|
296
|
+
page,
|
|
297
|
+
results_per_page,
|
|
298
|
+
_request_auth,
|
|
299
|
+
_content_type,
|
|
300
|
+
_headers,
|
|
301
|
+
_host_index,
|
|
302
|
+
) -> RequestSerialized:
|
|
303
|
+
|
|
304
|
+
_host = None
|
|
305
|
+
|
|
306
|
+
_collection_formats: Dict[str, str] = {
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
_path_params: Dict[str, str] = {}
|
|
310
|
+
_query_params: List[Tuple[str, str]] = []
|
|
311
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
312
|
+
_form_params: List[Tuple[str, str]] = []
|
|
313
|
+
_files: Dict[
|
|
314
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
315
|
+
] = {}
|
|
316
|
+
_body_params: Optional[bytes] = None
|
|
317
|
+
|
|
318
|
+
# process the path parameters
|
|
319
|
+
# process the query parameters
|
|
320
|
+
if task_type is not None:
|
|
321
|
+
|
|
322
|
+
_query_params.append(('task_type', task_type.value))
|
|
323
|
+
|
|
324
|
+
if is_completed is not None:
|
|
325
|
+
|
|
326
|
+
_query_params.append(('is_completed', is_completed))
|
|
327
|
+
|
|
328
|
+
if manual_review_required is not None:
|
|
329
|
+
|
|
330
|
+
_query_params.append(('manual_review_required', manual_review_required))
|
|
331
|
+
|
|
332
|
+
if page is not None:
|
|
333
|
+
|
|
334
|
+
_query_params.append(('page', page))
|
|
335
|
+
|
|
336
|
+
if results_per_page is not None:
|
|
337
|
+
|
|
338
|
+
_query_params.append(('results_per_page', results_per_page))
|
|
339
|
+
|
|
340
|
+
# process the header parameters
|
|
341
|
+
# process the form parameters
|
|
342
|
+
# process the body parameter
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
# set the HTTP header `Accept`
|
|
346
|
+
if 'Accept' not in _header_params:
|
|
347
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
348
|
+
[
|
|
349
|
+
'application/json'
|
|
350
|
+
]
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
# authentication setting
|
|
355
|
+
_auth_settings: List[str] = [
|
|
356
|
+
'opaque_token'
|
|
357
|
+
]
|
|
358
|
+
|
|
359
|
+
return self.api_client.param_serialize(
|
|
360
|
+
method='GET',
|
|
361
|
+
resource_path='/swifty/1/tasks/prescription_message_tasks',
|
|
362
|
+
path_params=_path_params,
|
|
363
|
+
query_params=_query_params,
|
|
364
|
+
header_params=_header_params,
|
|
365
|
+
body=_body_params,
|
|
366
|
+
post_params=_form_params,
|
|
367
|
+
files=_files,
|
|
368
|
+
auth_settings=_auth_settings,
|
|
369
|
+
collection_formats=_collection_formats,
|
|
370
|
+
_host=_host,
|
|
371
|
+
_request_auth=_request_auth
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX 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 rxfoundry.clients.swifty_api.models.address import Address
|
|
21
|
+
|
|
22
|
+
from rxfoundry.clients.swifty_api.api_client import ApiClient, RequestSerialized
|
|
23
|
+
from rxfoundry.clients.swifty_api.api_response import ApiResponse
|
|
24
|
+
from rxfoundry.clients.swifty_api.rest import RESTResponseType
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ValidationApi:
|
|
28
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
29
|
+
Ref: https://openapi-generator.tech
|
|
30
|
+
|
|
31
|
+
Do not edit the class manually.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(self, api_client=None) -> None:
|
|
35
|
+
if api_client is None:
|
|
36
|
+
api_client = ApiClient.get_default()
|
|
37
|
+
self.api_client = api_client
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@validate_call
|
|
41
|
+
def validate_address(
|
|
42
|
+
self,
|
|
43
|
+
address: Address,
|
|
44
|
+
_request_timeout: Union[
|
|
45
|
+
None,
|
|
46
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
47
|
+
Tuple[
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
50
|
+
]
|
|
51
|
+
] = None,
|
|
52
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
53
|
+
_content_type: Optional[StrictStr] = None,
|
|
54
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
56
|
+
) -> Address:
|
|
57
|
+
"""Validate and correct an address using Radar API
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
:param address: (required)
|
|
61
|
+
:type address: Address
|
|
62
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
63
|
+
number provided, it will be total request
|
|
64
|
+
timeout. It can also be a pair (tuple) of
|
|
65
|
+
(connection, read) timeouts.
|
|
66
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
67
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
68
|
+
request; this effectively ignores the
|
|
69
|
+
authentication in the spec for a single request.
|
|
70
|
+
:type _request_auth: dict, optional
|
|
71
|
+
:param _content_type: force content-type for the request.
|
|
72
|
+
:type _content_type: str, Optional
|
|
73
|
+
:param _headers: set to override the headers for a single
|
|
74
|
+
request; this effectively ignores the headers
|
|
75
|
+
in the spec for a single request.
|
|
76
|
+
:type _headers: dict, optional
|
|
77
|
+
:param _host_index: set to override the host_index for a single
|
|
78
|
+
request; this effectively ignores the host_index
|
|
79
|
+
in the spec for a single request.
|
|
80
|
+
:type _host_index: int, optional
|
|
81
|
+
:return: Returns the result object.
|
|
82
|
+
""" # noqa: E501
|
|
83
|
+
|
|
84
|
+
_param = self._validate_address_serialize(
|
|
85
|
+
address=address,
|
|
86
|
+
_request_auth=_request_auth,
|
|
87
|
+
_content_type=_content_type,
|
|
88
|
+
_headers=_headers,
|
|
89
|
+
_host_index=_host_index
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
93
|
+
'200': "Address",
|
|
94
|
+
'404': None,
|
|
95
|
+
}
|
|
96
|
+
response_data = self.api_client.call_api(
|
|
97
|
+
*_param,
|
|
98
|
+
_request_timeout=_request_timeout
|
|
99
|
+
)
|
|
100
|
+
response_data.read()
|
|
101
|
+
return self.api_client.response_deserialize(
|
|
102
|
+
response_data=response_data,
|
|
103
|
+
response_types_map=_response_types_map,
|
|
104
|
+
).data
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@validate_call
|
|
108
|
+
def validate_address_with_http_info(
|
|
109
|
+
self,
|
|
110
|
+
address: Address,
|
|
111
|
+
_request_timeout: Union[
|
|
112
|
+
None,
|
|
113
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
114
|
+
Tuple[
|
|
115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
116
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
117
|
+
]
|
|
118
|
+
] = None,
|
|
119
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
120
|
+
_content_type: Optional[StrictStr] = None,
|
|
121
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
122
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
123
|
+
) -> ApiResponse[Address]:
|
|
124
|
+
"""Validate and correct an address using Radar API
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
:param address: (required)
|
|
128
|
+
:type address: Address
|
|
129
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
130
|
+
number provided, it will be total request
|
|
131
|
+
timeout. It can also be a pair (tuple) of
|
|
132
|
+
(connection, read) timeouts.
|
|
133
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
134
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
135
|
+
request; this effectively ignores the
|
|
136
|
+
authentication in the spec for a single request.
|
|
137
|
+
:type _request_auth: dict, optional
|
|
138
|
+
:param _content_type: force content-type for the request.
|
|
139
|
+
:type _content_type: str, Optional
|
|
140
|
+
:param _headers: set to override the headers for a single
|
|
141
|
+
request; this effectively ignores the headers
|
|
142
|
+
in the spec for a single request.
|
|
143
|
+
:type _headers: dict, optional
|
|
144
|
+
:param _host_index: set to override the host_index for a single
|
|
145
|
+
request; this effectively ignores the host_index
|
|
146
|
+
in the spec for a single request.
|
|
147
|
+
:type _host_index: int, optional
|
|
148
|
+
:return: Returns the result object.
|
|
149
|
+
""" # noqa: E501
|
|
150
|
+
|
|
151
|
+
_param = self._validate_address_serialize(
|
|
152
|
+
address=address,
|
|
153
|
+
_request_auth=_request_auth,
|
|
154
|
+
_content_type=_content_type,
|
|
155
|
+
_headers=_headers,
|
|
156
|
+
_host_index=_host_index
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
160
|
+
'200': "Address",
|
|
161
|
+
'404': None,
|
|
162
|
+
}
|
|
163
|
+
response_data = self.api_client.call_api(
|
|
164
|
+
*_param,
|
|
165
|
+
_request_timeout=_request_timeout
|
|
166
|
+
)
|
|
167
|
+
response_data.read()
|
|
168
|
+
return self.api_client.response_deserialize(
|
|
169
|
+
response_data=response_data,
|
|
170
|
+
response_types_map=_response_types_map,
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
@validate_call
|
|
175
|
+
def validate_address_without_preload_content(
|
|
176
|
+
self,
|
|
177
|
+
address: Address,
|
|
178
|
+
_request_timeout: Union[
|
|
179
|
+
None,
|
|
180
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
181
|
+
Tuple[
|
|
182
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
183
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
184
|
+
]
|
|
185
|
+
] = None,
|
|
186
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
187
|
+
_content_type: Optional[StrictStr] = None,
|
|
188
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
189
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
190
|
+
) -> RESTResponseType:
|
|
191
|
+
"""Validate and correct an address using Radar API
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
:param address: (required)
|
|
195
|
+
:type address: Address
|
|
196
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
197
|
+
number provided, it will be total request
|
|
198
|
+
timeout. It can also be a pair (tuple) of
|
|
199
|
+
(connection, read) timeouts.
|
|
200
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
201
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
202
|
+
request; this effectively ignores the
|
|
203
|
+
authentication in the spec for a single request.
|
|
204
|
+
:type _request_auth: dict, optional
|
|
205
|
+
:param _content_type: force content-type for the request.
|
|
206
|
+
:type _content_type: str, Optional
|
|
207
|
+
:param _headers: set to override the headers for a single
|
|
208
|
+
request; this effectively ignores the headers
|
|
209
|
+
in the spec for a single request.
|
|
210
|
+
:type _headers: dict, optional
|
|
211
|
+
:param _host_index: set to override the host_index for a single
|
|
212
|
+
request; this effectively ignores the host_index
|
|
213
|
+
in the spec for a single request.
|
|
214
|
+
:type _host_index: int, optional
|
|
215
|
+
:return: Returns the result object.
|
|
216
|
+
""" # noqa: E501
|
|
217
|
+
|
|
218
|
+
_param = self._validate_address_serialize(
|
|
219
|
+
address=address,
|
|
220
|
+
_request_auth=_request_auth,
|
|
221
|
+
_content_type=_content_type,
|
|
222
|
+
_headers=_headers,
|
|
223
|
+
_host_index=_host_index
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
227
|
+
'200': "Address",
|
|
228
|
+
'404': None,
|
|
229
|
+
}
|
|
230
|
+
response_data = self.api_client.call_api(
|
|
231
|
+
*_param,
|
|
232
|
+
_request_timeout=_request_timeout
|
|
233
|
+
)
|
|
234
|
+
return response_data.response
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def _validate_address_serialize(
|
|
238
|
+
self,
|
|
239
|
+
address,
|
|
240
|
+
_request_auth,
|
|
241
|
+
_content_type,
|
|
242
|
+
_headers,
|
|
243
|
+
_host_index,
|
|
244
|
+
) -> RequestSerialized:
|
|
245
|
+
|
|
246
|
+
_host = None
|
|
247
|
+
|
|
248
|
+
_collection_formats: Dict[str, str] = {
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
_path_params: Dict[str, str] = {}
|
|
252
|
+
_query_params: List[Tuple[str, str]] = []
|
|
253
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
254
|
+
_form_params: List[Tuple[str, str]] = []
|
|
255
|
+
_files: Dict[
|
|
256
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
257
|
+
] = {}
|
|
258
|
+
_body_params: Optional[bytes] = None
|
|
259
|
+
|
|
260
|
+
# process the path parameters
|
|
261
|
+
# process the query parameters
|
|
262
|
+
# process the header parameters
|
|
263
|
+
# process the form parameters
|
|
264
|
+
# process the body parameter
|
|
265
|
+
if address is not None:
|
|
266
|
+
_body_params = address
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
# set the HTTP header `Accept`
|
|
270
|
+
if 'Accept' not in _header_params:
|
|
271
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
272
|
+
[
|
|
273
|
+
'application/json'
|
|
274
|
+
]
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
# set the HTTP header `Content-Type`
|
|
278
|
+
if _content_type:
|
|
279
|
+
_header_params['Content-Type'] = _content_type
|
|
280
|
+
else:
|
|
281
|
+
_default_content_type = (
|
|
282
|
+
self.api_client.select_header_content_type(
|
|
283
|
+
[
|
|
284
|
+
'application/json'
|
|
285
|
+
]
|
|
286
|
+
)
|
|
287
|
+
)
|
|
288
|
+
if _default_content_type is not None:
|
|
289
|
+
_header_params['Content-Type'] = _default_content_type
|
|
290
|
+
|
|
291
|
+
# authentication setting
|
|
292
|
+
_auth_settings: List[str] = [
|
|
293
|
+
'opaque_token'
|
|
294
|
+
]
|
|
295
|
+
|
|
296
|
+
return self.api_client.param_serialize(
|
|
297
|
+
method='POST',
|
|
298
|
+
resource_path='/swifty/1/validation/address',
|
|
299
|
+
path_params=_path_params,
|
|
300
|
+
query_params=_query_params,
|
|
301
|
+
header_params=_header_params,
|
|
302
|
+
body=_body_params,
|
|
303
|
+
post_params=_form_params,
|
|
304
|
+
files=_files,
|
|
305
|
+
auth_settings=_auth_settings,
|
|
306
|
+
collection_formats=_collection_formats,
|
|
307
|
+
_host=_host,
|
|
308
|
+
_request_auth=_request_auth
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
|