rxfoundry.clients.swifty-api 0.1.1005__py3-none-any.whl → 0.1.1007__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 +1 -0
- rxfoundry/clients/swifty_api/api/patient_api.py +290 -1
- rxfoundry/clients/swifty_api/models/__init__.py +1 -0
- rxfoundry/clients/swifty_api/models/create_patient_request.py +98 -0
- rxfoundry/clients/swifty_api/models/patient.py +5 -3
- {rxfoundry_clients_swifty_api-0.1.1005.dist-info → rxfoundry_clients_swifty_api-0.1.1007.dist-info}/METADATA +1 -1
- {rxfoundry_clients_swifty_api-0.1.1005.dist-info → rxfoundry_clients_swifty_api-0.1.1007.dist-info}/RECORD +9 -8
- {rxfoundry_clients_swifty_api-0.1.1005.dist-info → rxfoundry_clients_swifty_api-0.1.1007.dist-info}/WHEEL +0 -0
- {rxfoundry_clients_swifty_api-0.1.1005.dist-info → rxfoundry_clients_swifty_api-0.1.1007.dist-info}/top_level.txt +0 -0
|
@@ -51,6 +51,7 @@ from rxfoundry.clients.swifty_api.models.asynchronous_response import Asynchrono
|
|
|
51
51
|
from rxfoundry.clients.swifty_api.models.code import Code
|
|
52
52
|
from rxfoundry.clients.swifty_api.models.code_qualifier_code import CodeQualifierCode
|
|
53
53
|
from rxfoundry.clients.swifty_api.models.code_type import CodeType
|
|
54
|
+
from rxfoundry.clients.swifty_api.models.create_patient_request import CreatePatientRequest
|
|
54
55
|
from rxfoundry.clients.swifty_api.models.error_message import ErrorMessage
|
|
55
56
|
from rxfoundry.clients.swifty_api.models.fax import Fax
|
|
56
57
|
from rxfoundry.clients.swifty_api.models.formulary import Formulary
|
|
@@ -17,9 +17,10 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
17
17
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
18
|
from typing_extensions import Annotated
|
|
19
19
|
|
|
20
|
-
from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator
|
|
20
|
+
from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
|
21
21
|
from typing import List, Optional, Union
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
|
+
from rxfoundry.clients.swifty_api.models.create_patient_request import CreatePatientRequest
|
|
23
24
|
from rxfoundry.clients.swifty_api.models.insurance import Insurance
|
|
24
25
|
from rxfoundry.clients.swifty_api.models.patient import Patient
|
|
25
26
|
from rxfoundry.clients.swifty_api.models.patient_allergy import PatientAllergy
|
|
@@ -45,6 +46,277 @@ class PatientApi:
|
|
|
45
46
|
self.api_client = api_client
|
|
46
47
|
|
|
47
48
|
|
|
49
|
+
@validate_call
|
|
50
|
+
def create_patient(
|
|
51
|
+
self,
|
|
52
|
+
create_patient_request: CreatePatientRequest,
|
|
53
|
+
_request_timeout: Union[
|
|
54
|
+
None,
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Tuple[
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
59
|
+
]
|
|
60
|
+
] = None,
|
|
61
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_content_type: Optional[StrictStr] = None,
|
|
63
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
+
) -> Patient:
|
|
66
|
+
"""Create a patient
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
:param create_patient_request: (required)
|
|
70
|
+
:type create_patient_request: CreatePatientRequest
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._create_patient_serialize(
|
|
94
|
+
create_patient_request=create_patient_request,
|
|
95
|
+
_request_auth=_request_auth,
|
|
96
|
+
_content_type=_content_type,
|
|
97
|
+
_headers=_headers,
|
|
98
|
+
_host_index=_host_index
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
102
|
+
'200': "Patient",
|
|
103
|
+
}
|
|
104
|
+
response_data = self.api_client.call_api(
|
|
105
|
+
*_param,
|
|
106
|
+
_request_timeout=_request_timeout
|
|
107
|
+
)
|
|
108
|
+
response_data.read()
|
|
109
|
+
return self.api_client.response_deserialize(
|
|
110
|
+
response_data=response_data,
|
|
111
|
+
response_types_map=_response_types_map,
|
|
112
|
+
).data
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@validate_call
|
|
116
|
+
def create_patient_with_http_info(
|
|
117
|
+
self,
|
|
118
|
+
create_patient_request: CreatePatientRequest,
|
|
119
|
+
_request_timeout: Union[
|
|
120
|
+
None,
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
122
|
+
Tuple[
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
125
|
+
]
|
|
126
|
+
] = None,
|
|
127
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
128
|
+
_content_type: Optional[StrictStr] = None,
|
|
129
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
131
|
+
) -> ApiResponse[Patient]:
|
|
132
|
+
"""Create a patient
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
:param create_patient_request: (required)
|
|
136
|
+
:type create_patient_request: CreatePatientRequest
|
|
137
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
138
|
+
number provided, it will be total request
|
|
139
|
+
timeout. It can also be a pair (tuple) of
|
|
140
|
+
(connection, read) timeouts.
|
|
141
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
142
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
143
|
+
request; this effectively ignores the
|
|
144
|
+
authentication in the spec for a single request.
|
|
145
|
+
:type _request_auth: dict, optional
|
|
146
|
+
:param _content_type: force content-type for the request.
|
|
147
|
+
:type _content_type: str, Optional
|
|
148
|
+
:param _headers: set to override the headers for a single
|
|
149
|
+
request; this effectively ignores the headers
|
|
150
|
+
in the spec for a single request.
|
|
151
|
+
:type _headers: dict, optional
|
|
152
|
+
:param _host_index: set to override the host_index for a single
|
|
153
|
+
request; this effectively ignores the host_index
|
|
154
|
+
in the spec for a single request.
|
|
155
|
+
:type _host_index: int, optional
|
|
156
|
+
:return: Returns the result object.
|
|
157
|
+
""" # noqa: E501
|
|
158
|
+
|
|
159
|
+
_param = self._create_patient_serialize(
|
|
160
|
+
create_patient_request=create_patient_request,
|
|
161
|
+
_request_auth=_request_auth,
|
|
162
|
+
_content_type=_content_type,
|
|
163
|
+
_headers=_headers,
|
|
164
|
+
_host_index=_host_index
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
168
|
+
'200': "Patient",
|
|
169
|
+
}
|
|
170
|
+
response_data = self.api_client.call_api(
|
|
171
|
+
*_param,
|
|
172
|
+
_request_timeout=_request_timeout
|
|
173
|
+
)
|
|
174
|
+
response_data.read()
|
|
175
|
+
return self.api_client.response_deserialize(
|
|
176
|
+
response_data=response_data,
|
|
177
|
+
response_types_map=_response_types_map,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
@validate_call
|
|
182
|
+
def create_patient_without_preload_content(
|
|
183
|
+
self,
|
|
184
|
+
create_patient_request: CreatePatientRequest,
|
|
185
|
+
_request_timeout: Union[
|
|
186
|
+
None,
|
|
187
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
188
|
+
Tuple[
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
191
|
+
]
|
|
192
|
+
] = None,
|
|
193
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
194
|
+
_content_type: Optional[StrictStr] = None,
|
|
195
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
196
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
197
|
+
) -> RESTResponseType:
|
|
198
|
+
"""Create a patient
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
:param create_patient_request: (required)
|
|
202
|
+
:type create_patient_request: CreatePatientRequest
|
|
203
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
204
|
+
number provided, it will be total request
|
|
205
|
+
timeout. It can also be a pair (tuple) of
|
|
206
|
+
(connection, read) timeouts.
|
|
207
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
208
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
209
|
+
request; this effectively ignores the
|
|
210
|
+
authentication in the spec for a single request.
|
|
211
|
+
:type _request_auth: dict, optional
|
|
212
|
+
:param _content_type: force content-type for the request.
|
|
213
|
+
:type _content_type: str, Optional
|
|
214
|
+
:param _headers: set to override the headers for a single
|
|
215
|
+
request; this effectively ignores the headers
|
|
216
|
+
in the spec for a single request.
|
|
217
|
+
:type _headers: dict, optional
|
|
218
|
+
:param _host_index: set to override the host_index for a single
|
|
219
|
+
request; this effectively ignores the host_index
|
|
220
|
+
in the spec for a single request.
|
|
221
|
+
:type _host_index: int, optional
|
|
222
|
+
:return: Returns the result object.
|
|
223
|
+
""" # noqa: E501
|
|
224
|
+
|
|
225
|
+
_param = self._create_patient_serialize(
|
|
226
|
+
create_patient_request=create_patient_request,
|
|
227
|
+
_request_auth=_request_auth,
|
|
228
|
+
_content_type=_content_type,
|
|
229
|
+
_headers=_headers,
|
|
230
|
+
_host_index=_host_index
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
234
|
+
'200': "Patient",
|
|
235
|
+
}
|
|
236
|
+
response_data = self.api_client.call_api(
|
|
237
|
+
*_param,
|
|
238
|
+
_request_timeout=_request_timeout
|
|
239
|
+
)
|
|
240
|
+
return response_data.response
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def _create_patient_serialize(
|
|
244
|
+
self,
|
|
245
|
+
create_patient_request,
|
|
246
|
+
_request_auth,
|
|
247
|
+
_content_type,
|
|
248
|
+
_headers,
|
|
249
|
+
_host_index,
|
|
250
|
+
) -> RequestSerialized:
|
|
251
|
+
|
|
252
|
+
_host = None
|
|
253
|
+
|
|
254
|
+
_collection_formats: Dict[str, str] = {
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
_path_params: Dict[str, str] = {}
|
|
258
|
+
_query_params: List[Tuple[str, str]] = []
|
|
259
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
260
|
+
_form_params: List[Tuple[str, str]] = []
|
|
261
|
+
_files: Dict[
|
|
262
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
263
|
+
] = {}
|
|
264
|
+
_body_params: Optional[bytes] = None
|
|
265
|
+
|
|
266
|
+
# process the path parameters
|
|
267
|
+
# process the query parameters
|
|
268
|
+
# process the header parameters
|
|
269
|
+
# process the form parameters
|
|
270
|
+
# process the body parameter
|
|
271
|
+
if create_patient_request is not None:
|
|
272
|
+
_body_params = create_patient_request
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
# set the HTTP header `Accept`
|
|
276
|
+
if 'Accept' not in _header_params:
|
|
277
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
278
|
+
[
|
|
279
|
+
'application/json'
|
|
280
|
+
]
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
# set the HTTP header `Content-Type`
|
|
284
|
+
if _content_type:
|
|
285
|
+
_header_params['Content-Type'] = _content_type
|
|
286
|
+
else:
|
|
287
|
+
_default_content_type = (
|
|
288
|
+
self.api_client.select_header_content_type(
|
|
289
|
+
[
|
|
290
|
+
'application/json'
|
|
291
|
+
]
|
|
292
|
+
)
|
|
293
|
+
)
|
|
294
|
+
if _default_content_type is not None:
|
|
295
|
+
_header_params['Content-Type'] = _default_content_type
|
|
296
|
+
|
|
297
|
+
# authentication setting
|
|
298
|
+
_auth_settings: List[str] = [
|
|
299
|
+
'opaque_token'
|
|
300
|
+
]
|
|
301
|
+
|
|
302
|
+
return self.api_client.param_serialize(
|
|
303
|
+
method='POST',
|
|
304
|
+
resource_path='/swifty/1/patients',
|
|
305
|
+
path_params=_path_params,
|
|
306
|
+
query_params=_query_params,
|
|
307
|
+
header_params=_header_params,
|
|
308
|
+
body=_body_params,
|
|
309
|
+
post_params=_form_params,
|
|
310
|
+
files=_files,
|
|
311
|
+
auth_settings=_auth_settings,
|
|
312
|
+
collection_formats=_collection_formats,
|
|
313
|
+
_host=_host,
|
|
314
|
+
_request_auth=_request_auth
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
48
320
|
@validate_call
|
|
49
321
|
def get_patient(
|
|
50
322
|
self,
|
|
@@ -1728,6 +2000,7 @@ class PatientApi:
|
|
|
1728
2000
|
q: Annotated[Optional[StrictStr], Field(description="Filter patients by query. This takes precedence if set over remaining filters. Searches on first name, last name, date of birth (yyyy-mm-dd), home address and phone numbers in (555) 555-5555 format.")] = None,
|
|
1729
2001
|
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,
|
|
1730
2002
|
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,
|
|
2003
|
+
is_registered: Annotated[Optional[StrictBool], Field(description="Filter patients by registration status. Defaults to true.")] = None,
|
|
1731
2004
|
page: Annotated[Optional[StrictInt], Field(description="Page number to return. Defaults to 1.")] = None,
|
|
1732
2005
|
results_per_page: Annotated[Optional[StrictInt], Field(description="Number of results to return per page. Defaults to 10.")] = None,
|
|
1733
2006
|
expand: Annotated[Optional[List[StrictStr]], Field(description="The list of contained objects to return as well. Defaults to none.")] = None,
|
|
@@ -1753,6 +2026,8 @@ class PatientApi:
|
|
|
1753
2026
|
:type external_id: str
|
|
1754
2027
|
:param uuid_list: A list of uuid strings to filter by. Only used if q and external_id are not set.
|
|
1755
2028
|
:type uuid_list: List[str]
|
|
2029
|
+
:param is_registered: Filter patients by registration status. Defaults to true.
|
|
2030
|
+
:type is_registered: bool
|
|
1756
2031
|
:param page: Page number to return. Defaults to 1.
|
|
1757
2032
|
:type page: int
|
|
1758
2033
|
:param results_per_page: Number of results to return per page. Defaults to 10.
|
|
@@ -1785,6 +2060,7 @@ class PatientApi:
|
|
|
1785
2060
|
q=q,
|
|
1786
2061
|
external_id=external_id,
|
|
1787
2062
|
uuid_list=uuid_list,
|
|
2063
|
+
is_registered=is_registered,
|
|
1788
2064
|
page=page,
|
|
1789
2065
|
results_per_page=results_per_page,
|
|
1790
2066
|
expand=expand,
|
|
@@ -1815,6 +2091,7 @@ class PatientApi:
|
|
|
1815
2091
|
q: Annotated[Optional[StrictStr], Field(description="Filter patients by query. This takes precedence if set over remaining filters. Searches on first name, last name, date of birth (yyyy-mm-dd), home address and phone numbers in (555) 555-5555 format.")] = None,
|
|
1816
2092
|
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,
|
|
1817
2093
|
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,
|
|
2094
|
+
is_registered: Annotated[Optional[StrictBool], Field(description="Filter patients by registration status. Defaults to true.")] = None,
|
|
1818
2095
|
page: Annotated[Optional[StrictInt], Field(description="Page number to return. Defaults to 1.")] = None,
|
|
1819
2096
|
results_per_page: Annotated[Optional[StrictInt], Field(description="Number of results to return per page. Defaults to 10.")] = None,
|
|
1820
2097
|
expand: Annotated[Optional[List[StrictStr]], Field(description="The list of contained objects to return as well. Defaults to none.")] = None,
|
|
@@ -1840,6 +2117,8 @@ class PatientApi:
|
|
|
1840
2117
|
:type external_id: str
|
|
1841
2118
|
:param uuid_list: A list of uuid strings to filter by. Only used if q and external_id are not set.
|
|
1842
2119
|
:type uuid_list: List[str]
|
|
2120
|
+
:param is_registered: Filter patients by registration status. Defaults to true.
|
|
2121
|
+
:type is_registered: bool
|
|
1843
2122
|
:param page: Page number to return. Defaults to 1.
|
|
1844
2123
|
:type page: int
|
|
1845
2124
|
:param results_per_page: Number of results to return per page. Defaults to 10.
|
|
@@ -1872,6 +2151,7 @@ class PatientApi:
|
|
|
1872
2151
|
q=q,
|
|
1873
2152
|
external_id=external_id,
|
|
1874
2153
|
uuid_list=uuid_list,
|
|
2154
|
+
is_registered=is_registered,
|
|
1875
2155
|
page=page,
|
|
1876
2156
|
results_per_page=results_per_page,
|
|
1877
2157
|
expand=expand,
|
|
@@ -1902,6 +2182,7 @@ class PatientApi:
|
|
|
1902
2182
|
q: Annotated[Optional[StrictStr], Field(description="Filter patients by query. This takes precedence if set over remaining filters. Searches on first name, last name, date of birth (yyyy-mm-dd), home address and phone numbers in (555) 555-5555 format.")] = None,
|
|
1903
2183
|
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,
|
|
1904
2184
|
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,
|
|
2185
|
+
is_registered: Annotated[Optional[StrictBool], Field(description="Filter patients by registration status. Defaults to true.")] = None,
|
|
1905
2186
|
page: Annotated[Optional[StrictInt], Field(description="Page number to return. Defaults to 1.")] = None,
|
|
1906
2187
|
results_per_page: Annotated[Optional[StrictInt], Field(description="Number of results to return per page. Defaults to 10.")] = None,
|
|
1907
2188
|
expand: Annotated[Optional[List[StrictStr]], Field(description="The list of contained objects to return as well. Defaults to none.")] = None,
|
|
@@ -1927,6 +2208,8 @@ class PatientApi:
|
|
|
1927
2208
|
:type external_id: str
|
|
1928
2209
|
:param uuid_list: A list of uuid strings to filter by. Only used if q and external_id are not set.
|
|
1929
2210
|
:type uuid_list: List[str]
|
|
2211
|
+
:param is_registered: Filter patients by registration status. Defaults to true.
|
|
2212
|
+
:type is_registered: bool
|
|
1930
2213
|
:param page: Page number to return. Defaults to 1.
|
|
1931
2214
|
:type page: int
|
|
1932
2215
|
:param results_per_page: Number of results to return per page. Defaults to 10.
|
|
@@ -1959,6 +2242,7 @@ class PatientApi:
|
|
|
1959
2242
|
q=q,
|
|
1960
2243
|
external_id=external_id,
|
|
1961
2244
|
uuid_list=uuid_list,
|
|
2245
|
+
is_registered=is_registered,
|
|
1962
2246
|
page=page,
|
|
1963
2247
|
results_per_page=results_per_page,
|
|
1964
2248
|
expand=expand,
|
|
@@ -1984,6 +2268,7 @@ class PatientApi:
|
|
|
1984
2268
|
q,
|
|
1985
2269
|
external_id,
|
|
1986
2270
|
uuid_list,
|
|
2271
|
+
is_registered,
|
|
1987
2272
|
page,
|
|
1988
2273
|
results_per_page,
|
|
1989
2274
|
expand,
|
|
@@ -2023,6 +2308,10 @@ class PatientApi:
|
|
|
2023
2308
|
|
|
2024
2309
|
_query_params.append(('uuid_list', uuid_list))
|
|
2025
2310
|
|
|
2311
|
+
if is_registered is not None:
|
|
2312
|
+
|
|
2313
|
+
_query_params.append(('is_registered', is_registered))
|
|
2314
|
+
|
|
2026
2315
|
if page is not None:
|
|
2027
2316
|
|
|
2028
2317
|
_query_params.append(('page', page))
|
|
@@ -20,6 +20,7 @@ from rxfoundry.clients.swifty_api.models.asynchronous_response import Asynchrono
|
|
|
20
20
|
from rxfoundry.clients.swifty_api.models.code import Code
|
|
21
21
|
from rxfoundry.clients.swifty_api.models.code_qualifier_code import CodeQualifierCode
|
|
22
22
|
from rxfoundry.clients.swifty_api.models.code_type import CodeType
|
|
23
|
+
from rxfoundry.clients.swifty_api.models.create_patient_request import CreatePatientRequest
|
|
23
24
|
from rxfoundry.clients.swifty_api.models.error_message import ErrorMessage
|
|
24
25
|
from rxfoundry.clients.swifty_api.models.fax import Fax
|
|
25
26
|
from rxfoundry.clients.swifty_api.models.formulary import Formulary
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from rxfoundry.clients.swifty_api.models.patient_address_data import PatientAddressData
|
|
24
|
+
from rxfoundry.clients.swifty_api.models.patient_data import PatientData
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class CreatePatientRequest(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
Request wrapper for creating a patient
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
patient: PatientData
|
|
33
|
+
address: Optional[PatientAddressData] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["patient", "address"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of CreatePatientRequest from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of patient
|
|
76
|
+
if self.patient:
|
|
77
|
+
_dict['patient'] = self.patient.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of address
|
|
79
|
+
if self.address:
|
|
80
|
+
_dict['address'] = self.address.to_dict()
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of CreatePatientRequest from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"patient": PatientData.from_dict(obj["patient"]) if obj.get("patient") is not None else None,
|
|
94
|
+
"address": PatientAddressData.from_dict(obj["address"]) if obj.get("address") is not None else None
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -18,7 +18,7 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from rxfoundry.clients.swifty_api.models.address import Address
|
|
24
24
|
from rxfoundry.clients.swifty_api.models.code import Code
|
|
@@ -58,7 +58,8 @@ class Patient(BaseModel):
|
|
|
58
58
|
former_phone_numbers: Optional[List[PatientPhoneNumber]] = None
|
|
59
59
|
former_addresses: Optional[List[Address]] = None
|
|
60
60
|
former_insurances: Optional[List[Insurance]] = None
|
|
61
|
-
|
|
61
|
+
is_registered: Optional[StrictBool] = None
|
|
62
|
+
__properties: ClassVar[List[str]] = ["uuid", "last_name", "first_name", "middle_name", "suffix", "prefix", "gender", "date_of_birth", "home_address", "primary_phone", "alternate_phone", "email", "external_references", "allergies", "conditions", "medications", "insurances", "preferred_language", "former_names", "former_phone_numbers", "former_addresses", "former_insurances", "is_registered"]
|
|
62
63
|
|
|
63
64
|
model_config = ConfigDict(
|
|
64
65
|
populate_by_name=True,
|
|
@@ -204,7 +205,8 @@ class Patient(BaseModel):
|
|
|
204
205
|
"former_names": [PatientName.from_dict(_item) for _item in obj["former_names"]] if obj.get("former_names") is not None else None,
|
|
205
206
|
"former_phone_numbers": [PatientPhoneNumber.from_dict(_item) for _item in obj["former_phone_numbers"]] if obj.get("former_phone_numbers") is not None else None,
|
|
206
207
|
"former_addresses": [Address.from_dict(_item) for _item in obj["former_addresses"]] if obj.get("former_addresses") is not None else None,
|
|
207
|
-
"former_insurances": [Insurance.from_dict(_item) for _item in obj["former_insurances"]] if obj.get("former_insurances") is not None else None
|
|
208
|
+
"former_insurances": [Insurance.from_dict(_item) for _item in obj["former_insurances"]] if obj.get("former_insurances") is not None else None,
|
|
209
|
+
"is_registered": obj.get("is_registered")
|
|
208
210
|
})
|
|
209
211
|
return _obj
|
|
210
212
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
rxfoundry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
rxfoundry/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
rxfoundry/clients/swifty_api/__init__.py,sha256=
|
|
3
|
+
rxfoundry/clients/swifty_api/__init__.py,sha256=SK8lo2vWbvrQsK55TZ2ioV18qpSkCQ-_WSY5Z3RUn28,7941
|
|
4
4
|
rxfoundry/clients/swifty_api/api_client.py,sha256=21O5hmoALjCb5pSboezl1urewW9Du1qBBMw_KAI9d2c,27530
|
|
5
5
|
rxfoundry/clients/swifty_api/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
6
6
|
rxfoundry/clients/swifty_api/configuration.py,sha256=Zc2CFogQxudT2rKqsdl8UTAJRs2fGAAn9N7L4hkxCLU,18253
|
|
@@ -13,7 +13,7 @@ rxfoundry/clients/swifty_api/api/code_api.py,sha256=CySSR7Lw05rZzYkzToyrRyt5APcO
|
|
|
13
13
|
rxfoundry/clients/swifty_api/api/default_api.py,sha256=kweJa5YpKgugk8niuZrczW3YQ245myNShaJ6gwAUI5M,12251
|
|
14
14
|
rxfoundry/clients/swifty_api/api/fax_api.py,sha256=p7Uy_YJJ2VI7LA1O0LU6cxSY4CpGuYdFpV9qBdN3Z-M,23514
|
|
15
15
|
rxfoundry/clients/swifty_api/api/medication_api.py,sha256=uDcAvJ4scGVBxanGYjbXarpZ7esHRmcvhEMobSvA73g,49547
|
|
16
|
-
rxfoundry/clients/swifty_api/api/patient_api.py,sha256=
|
|
16
|
+
rxfoundry/clients/swifty_api/api/patient_api.py,sha256=ShJk70-hROrSeAAn4hJ6lAzxP5C-popkWot9tVQek54,93844
|
|
17
17
|
rxfoundry/clients/swifty_api/api/pharmacist_api.py,sha256=6oEqrrIEmBB0i2iDIQKsjJr7fuGiY0J-H_NWIjp1Qvc,24931
|
|
18
18
|
rxfoundry/clients/swifty_api/api/pharmacy_api.py,sha256=t86xd58lZMZE1x74XKW8C3fwk2UZhFn5ZpJUQ9kR8e8,30623
|
|
19
19
|
rxfoundry/clients/swifty_api/api/prescriber_api.py,sha256=HeEZCXVJot9e6yprgkfCGjkZWdubbBIWaP86ekB7pXI,25033
|
|
@@ -26,12 +26,13 @@ rxfoundry/clients/swifty_api/api/validation_api.py,sha256=mNnRcbstgar8_VAR7teFj_
|
|
|
26
26
|
rxfoundry/clients/swifty_api/api/version_api.py,sha256=NkwCrP8-Q4PNR4l8OaRt-9xiJRkvIcBIzhNYbmSUc30,10267
|
|
27
27
|
rxfoundry/clients/swifty_api/api/virtual_pharmacy_api.py,sha256=h0svegA50IuEtg0MStUD7XA0eaR2j0jlROQV_09tzt4,20588
|
|
28
28
|
rxfoundry/clients/swifty_api/api/workflow_api.py,sha256=6uVE1xpLtiYS8C6EmOwKaMeWvtbvaYAvRzuXMHyDL7E,23681
|
|
29
|
-
rxfoundry/clients/swifty_api/models/__init__.py,sha256=
|
|
29
|
+
rxfoundry/clients/swifty_api/models/__init__.py,sha256=nffWYE3IJzOYjWHx40rO0KGPgFKbXqMNgIWI1Hxq3Go,6224
|
|
30
30
|
rxfoundry/clients/swifty_api/models/address.py,sha256=6Q3sw8uG60Pbam94_Nn4_7dCqM3-78UGK55ER33_kYo,4665
|
|
31
31
|
rxfoundry/clients/swifty_api/models/asynchronous_response.py,sha256=_7eSH5B0OqbsMfi7djh-Qs9WH-nW8te8nvzzm639RHg,3287
|
|
32
32
|
rxfoundry/clients/swifty_api/models/code.py,sha256=RgwBS2bwB8z9IPNQg7AAJA09rChX0tik3sx9g0AQovk,2623
|
|
33
33
|
rxfoundry/clients/swifty_api/models/code_qualifier_code.py,sha256=dHIUHnEDIMHWcmmOAQ4BlaeNPT8kftNp_c1iR4n7xnQ,2996
|
|
34
34
|
rxfoundry/clients/swifty_api/models/code_type.py,sha256=hKYsEbE7KdD5uSw6LOjm6draFvQi3P5M8JGr5QDKXTc,2659
|
|
35
|
+
rxfoundry/clients/swifty_api/models/create_patient_request.py,sha256=6KsC4YBNxP_3Fu5ILphigQzcAoM2DnxKb6ee0vr9y2E,3226
|
|
35
36
|
rxfoundry/clients/swifty_api/models/error_message.py,sha256=WgL6GkqLt5-lN3mkfAbumWWLwCUPSB7Us4OHIKBVKhY,2605
|
|
36
37
|
rxfoundry/clients/swifty_api/models/fax.py,sha256=XsfykGOhCPFcK6ojjv93wbOJOGU7dm8A2-AXPPN5-d8,5781
|
|
37
38
|
rxfoundry/clients/swifty_api/models/formulary.py,sha256=K4e27ZQ4HlBq1-SDF7ohwlr8RNfsQ8vqOe8XAFnH-WM,3130
|
|
@@ -41,7 +42,7 @@ rxfoundry/clients/swifty_api/models/medication_instruction.py,sha256=psE2WrTIabo
|
|
|
41
42
|
rxfoundry/clients/swifty_api/models/medication_program_pricing.py,sha256=QJZB9QstuUE-LlXVBru77U-H3DSArDCcdxy4PiFPxJs,3288
|
|
42
43
|
rxfoundry/clients/swifty_api/models/medication_ref.py,sha256=S4-3TS8JuRd59XunUMRTu820Q8mMTwdTKS6lN8zDHbw,3135
|
|
43
44
|
rxfoundry/clients/swifty_api/models/medication_variant.py,sha256=ihFrARNHPo_R8XVjvAeJcdPnMs5bUeC0RRxpQwFh5MA,2888
|
|
44
|
-
rxfoundry/clients/swifty_api/models/patient.py,sha256=
|
|
45
|
+
rxfoundry/clients/swifty_api/models/patient.py,sha256=jGr6N94Z736TBPJjW2c4DZEqBpBofMMqotBtE0gkP9s,10712
|
|
45
46
|
rxfoundry/clients/swifty_api/models/patient_activity_data.py,sha256=kxRQwAzjd2yruI_5i-yavJGcuz8n6aq3xRLJIn56RAc,7259
|
|
46
47
|
rxfoundry/clients/swifty_api/models/patient_activity_message.py,sha256=Uh0ygKWqat6_IsyML1uKHLtUNTlKPp5-CrC6qs-ga24,4086
|
|
47
48
|
rxfoundry/clients/swifty_api/models/patient_activity_notification.py,sha256=NUWHen1WNHHPlCdf6pL4C-r18E6Hs1AtoRpKAsCDuE4,3971
|
|
@@ -103,7 +104,7 @@ rxfoundry/clients/swifty_api/models/workflow_sub_task_sub_task.py,sha256=0xp-FNZ
|
|
|
103
104
|
rxfoundry/clients/swifty_api/models/workflow_task.py,sha256=sEZfS5hgaepJ725yWqOGPMJucc85LaB2Vnmln3K800U,3594
|
|
104
105
|
rxfoundry/clients/swifty_api/models/workflow_task_task.py,sha256=bdU1NmMhlbBIP_Mz9l_-W1uYj7eiZ2G82dKEOttiq_U,6304
|
|
105
106
|
rxfoundry/clients/swifty_api/models/workflow_type.py,sha256=RuVz5rEqKktxWbzz7JkPc-Evw86YTh21EX4mgH8IjG4,1596
|
|
106
|
-
rxfoundry_clients_swifty_api-0.1.
|
|
107
|
-
rxfoundry_clients_swifty_api-0.1.
|
|
108
|
-
rxfoundry_clients_swifty_api-0.1.
|
|
109
|
-
rxfoundry_clients_swifty_api-0.1.
|
|
107
|
+
rxfoundry_clients_swifty_api-0.1.1007.dist-info/METADATA,sha256=iLLgtI6e75GJZ4463IE0gWAeeo0WybW68RjfRNqTuX4,595
|
|
108
|
+
rxfoundry_clients_swifty_api-0.1.1007.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
109
|
+
rxfoundry_clients_swifty_api-0.1.1007.dist-info/top_level.txt,sha256=x7AlWW4imWljpZ91S0V0Pq8YFe0UFn8rBgeIQhJ5q5A,10
|
|
110
|
+
rxfoundry_clients_swifty_api-0.1.1007.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|