phenoml 0.0.2__py3-none-any.whl → 0.0.17__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.
- phenoml/agent/__init__.py +6 -8
- phenoml/agent/client.py +85 -67
- phenoml/agent/raw_client.py +61 -77
- phenoml/agent/types/__init__.py +6 -8
- phenoml/agent/types/agent_create_request.py +53 -0
- phenoml/agent/types/agent_create_request_provider.py +5 -0
- phenoml/agent/types/agent_template.py +3 -6
- phenoml/agent/types/agent_template_provider.py +5 -0
- phenoml/agent/types/json_patch_operation.py +5 -1
- phenoml/client.py +12 -0
- phenoml/construe/__init__.py +2 -16
- phenoml/construe/client.py +0 -90
- phenoml/construe/raw_client.py +0 -180
- phenoml/construe/types/__init__.py +2 -20
- phenoml/construe/types/extract_request_config.py +33 -4
- phenoml/construe/types/extract_request_config_chunking_method.py +3 -1
- phenoml/construe/types/extract_request_config_validation_method.py +5 -0
- phenoml/construe/types/extract_request_system.py +2 -0
- phenoml/core/client_wrapper.py +2 -2
- phenoml/fhir/__init__.py +36 -0
- phenoml/fhir/client.py +1072 -0
- phenoml/fhir/errors/__init__.py +10 -0
- phenoml/fhir/errors/bad_request_error.py +10 -0
- phenoml/fhir/errors/internal_server_error.py +10 -0
- phenoml/fhir/errors/not_found_error.py +10 -0
- phenoml/fhir/errors/unauthorized_error.py +10 -0
- phenoml/fhir/raw_client.py +1469 -0
- phenoml/fhir/types/__init__.py +29 -0
- phenoml/{agent/types/chat_fhir_client_config.py → fhir/types/error_response.py} +11 -6
- phenoml/fhir/types/fhir_bundle.py +43 -0
- phenoml/fhir/types/fhir_bundle_entry_item.py +34 -0
- phenoml/fhir/types/fhir_bundle_entry_item_request.py +25 -0
- phenoml/fhir/types/fhir_bundle_entry_item_request_method.py +5 -0
- phenoml/{construe/types/bad_request_error_body.py → fhir/types/fhir_bundle_entry_item_response.py} +4 -7
- phenoml/fhir/types/fhir_patch_request_body_item.py +40 -0
- phenoml/fhir/types/fhir_patch_request_body_item_op.py +7 -0
- phenoml/fhir/types/fhir_resource.py +40 -0
- phenoml/fhir/types/fhir_resource_meta.py +28 -0
- phenoml/fhir/types/fhir_search_response.py +8 -0
- phenoml/fhir_provider/__init__.py +45 -0
- phenoml/fhir_provider/client.py +748 -0
- phenoml/fhir_provider/errors/__init__.py +11 -0
- phenoml/fhir_provider/errors/bad_request_error.py +10 -0
- phenoml/fhir_provider/errors/forbidden_error.py +10 -0
- phenoml/fhir_provider/errors/internal_server_error.py +10 -0
- phenoml/fhir_provider/errors/not_found_error.py +10 -0
- phenoml/fhir_provider/errors/unauthorized_error.py +10 -0
- phenoml/fhir_provider/raw_client.py +1462 -0
- phenoml/fhir_provider/types/__init__.py +37 -0
- phenoml/fhir_provider/types/auth_method.py +7 -0
- phenoml/fhir_provider/types/fhir_provider_auth_config.py +53 -0
- phenoml/fhir_provider/types/fhir_provider_delete_response.py +20 -0
- phenoml/fhir_provider/types/fhir_provider_list_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_remove_auth_config_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_set_active_auth_config_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_template.py +66 -0
- phenoml/fhir_provider/types/fhir_query_response.py +27 -0
- phenoml/fhir_provider/types/fhir_query_response_data.py +5 -0
- phenoml/fhir_provider/types/json_web_key.py +51 -0
- phenoml/fhir_provider/types/provider.py +8 -0
- phenoml/fhir_provider/types/role.py +27 -0
- phenoml/fhir_provider/types/service_account_key.py +35 -0
- phenoml/fhir_provider/types/smart_configuration.py +46 -0
- phenoml/lang2fhir/__init__.py +10 -0
- phenoml/lang2fhir/client.py +111 -6
- phenoml/lang2fhir/raw_client.py +189 -0
- phenoml/lang2fhir/types/__init__.py +10 -0
- phenoml/lang2fhir/types/create_multi_response.py +39 -0
- phenoml/lang2fhir/types/create_multi_response_bundle.py +28 -0
- phenoml/lang2fhir/types/create_multi_response_bundle_entry_item.py +24 -0
- phenoml/lang2fhir/types/create_multi_response_bundle_entry_item_request.py +20 -0
- phenoml/{construe/types/construe_cohort_response_queries_item_code_extract_results_item_codes_item.py → lang2fhir/types/create_multi_response_resources_item.py} +13 -7
- phenoml/summary/__init__.py +41 -0
- phenoml/summary/client.py +668 -0
- phenoml/summary/errors/__init__.py +11 -0
- phenoml/summary/errors/bad_request_error.py +10 -0
- phenoml/summary/errors/forbidden_error.py +10 -0
- phenoml/summary/errors/internal_server_error.py +10 -0
- phenoml/summary/errors/not_found_error.py +10 -0
- phenoml/summary/errors/unauthorized_error.py +10 -0
- phenoml/summary/raw_client.py +1202 -0
- phenoml/summary/types/__init__.py +33 -0
- phenoml/summary/types/create_summary_request_fhir_resources.py +8 -0
- phenoml/summary/types/create_summary_request_mode.py +5 -0
- phenoml/{agent/types/agent_fhir_config.py → summary/types/create_summary_response.py} +7 -9
- phenoml/summary/types/create_summary_template_response.py +23 -0
- phenoml/{construe/types/unauthorized_error_body.py → summary/types/error_response.py} +4 -8
- phenoml/summary/types/fhir_bundle.py +23 -0
- phenoml/summary/types/fhir_bundle_entry_item.py +20 -0
- phenoml/summary/types/fhir_resource.py +24 -0
- phenoml/summary/types/summary_delete_template_response.py +20 -0
- phenoml/summary/types/summary_get_template_response.py +21 -0
- phenoml/summary/types/summary_list_templates_response.py +21 -0
- phenoml/summary/types/summary_template.py +41 -0
- phenoml/summary/types/summary_update_template_response.py +22 -0
- phenoml/tools/__init__.py +6 -8
- phenoml/tools/client.py +259 -44
- phenoml/tools/raw_client.py +347 -55
- phenoml/tools/types/__init__.py +6 -8
- phenoml/tools/types/lang2fhir_and_create_multi_response.py +41 -0
- phenoml/{construe/types/construe_cohort_response_queries_item_code_extract_results_item.py → tools/types/lang2fhir_and_create_multi_response_resource_info_item.py} +14 -7
- phenoml/tools/types/lang2fhir_and_create_multi_response_response_bundle.py +27 -0
- phenoml/workflows/__init__.py +61 -0
- phenoml/workflows/client.py +694 -0
- phenoml/workflows/errors/__init__.py +11 -0
- phenoml/workflows/errors/bad_request_error.py +10 -0
- phenoml/workflows/errors/forbidden_error.py +10 -0
- phenoml/workflows/errors/internal_server_error.py +10 -0
- phenoml/workflows/errors/not_found_error.py +10 -0
- phenoml/workflows/errors/unauthorized_error.py +10 -0
- phenoml/workflows/raw_client.py +1266 -0
- phenoml/workflows/types/__init__.py +53 -0
- phenoml/workflows/types/create_workflow_request_fhir_provider_id.py +5 -0
- phenoml/workflows/types/create_workflow_response.py +44 -0
- phenoml/{tools/types/fhir_client_config.py → workflows/types/decision_node_definition.py} +7 -6
- phenoml/workflows/types/execute_workflow_response.py +30 -0
- phenoml/{construe/types/internal_server_error_body.py → workflows/types/execute_workflow_response_results.py} +3 -8
- phenoml/workflows/types/lang2fhir_create_definition.py +37 -0
- phenoml/workflows/types/lang2fhir_search_definition.py +42 -0
- phenoml/workflows/types/list_workflows_response.py +39 -0
- phenoml/workflows/types/step_operation.py +26 -0
- phenoml/workflows/types/sub_workflow_definition.py +32 -0
- phenoml/workflows/types/update_workflow_request_fhir_provider_id.py +5 -0
- phenoml/workflows/types/workflow_config.py +27 -0
- phenoml/workflows/types/workflow_definition.py +57 -0
- phenoml/workflows/types/workflow_graph.py +23 -0
- phenoml/workflows/types/workflow_response.py +61 -0
- phenoml/workflows/types/workflow_response_graph.py +23 -0
- phenoml/workflows/types/workflow_step.py +55 -0
- phenoml/workflows/types/workflow_step_summary.py +47 -0
- phenoml/workflows/types/workflow_step_summary_type.py +5 -0
- phenoml/workflows/types/workflow_step_type.py +5 -0
- phenoml/workflows/types/workflows_delete_response.py +20 -0
- phenoml/workflows/types/workflows_get_response.py +26 -0
- phenoml/workflows/types/workflows_update_response.py +31 -0
- phenoml-0.0.17.dist-info/LICENSE +21 -0
- {phenoml-0.0.2.dist-info → phenoml-0.0.17.dist-info}/METADATA +1 -1
- phenoml-0.0.17.dist-info/RECORD +251 -0
- phenoml/agent/types/agent_provider.py +0 -7
- phenoml/agent/types/provider_type.py +0 -5
- phenoml/construe/types/construe_cohort_request_config.py +0 -37
- phenoml/construe/types/construe_cohort_response.py +0 -33
- phenoml/construe/types/construe_cohort_response_queries_item.py +0 -49
- phenoml/tools/types/cohort_request_provider.py +0 -5
- phenoml/tools/types/lang2fhir_and_create_request_provider.py +0 -7
- phenoml/tools/types/lang2fhir_and_search_request_provider.py +0 -7
- phenoml-0.0.2.dist-info/RECORD +0 -153
- {phenoml-0.0.2.dist-info → phenoml-0.0.17.dist-info}/WHEEL +0 -0
phenoml/tools/raw_client.py
CHANGED
|
@@ -8,19 +8,15 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
|
8
8
|
from ..core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
9
|
from ..core.pydantic_utilities import parse_obj_as
|
|
10
10
|
from ..core.request_options import RequestOptions
|
|
11
|
-
from ..core.serialization import convert_and_respect_annotation_metadata
|
|
12
11
|
from .errors.bad_request_error import BadRequestError
|
|
13
12
|
from .errors.failed_dependency_error import FailedDependencyError
|
|
14
13
|
from .errors.forbidden_error import ForbiddenError
|
|
15
14
|
from .errors.internal_server_error import InternalServerError
|
|
16
15
|
from .errors.unauthorized_error import UnauthorizedError
|
|
17
|
-
from .types.cohort_request_provider import CohortRequestProvider
|
|
18
16
|
from .types.cohort_response import CohortResponse
|
|
19
|
-
from .types.
|
|
20
|
-
from .types.lang2fhir_and_create_request_provider import Lang2FhirAndCreateRequestProvider
|
|
17
|
+
from .types.lang2fhir_and_create_multi_response import Lang2FhirAndCreateMultiResponse
|
|
21
18
|
from .types.lang2fhir_and_create_request_resource import Lang2FhirAndCreateRequestResource
|
|
22
19
|
from .types.lang2fhir_and_create_response import Lang2FhirAndCreateResponse
|
|
23
|
-
from .types.lang2fhir_and_search_request_provider import Lang2FhirAndSearchRequestProvider
|
|
24
20
|
from .types.lang2fhir_and_search_response import Lang2FhirAndSearchResponse
|
|
25
21
|
|
|
26
22
|
# this is used as the default value for optional parameters
|
|
@@ -36,8 +32,9 @@ class RawToolsClient:
|
|
|
36
32
|
*,
|
|
37
33
|
resource: Lang2FhirAndCreateRequestResource,
|
|
38
34
|
text: str,
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
36
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
37
|
+
provider: typing.Optional[str] = OMIT,
|
|
41
38
|
request_options: typing.Optional[RequestOptions] = None,
|
|
42
39
|
) -> HttpResponse[Lang2FhirAndCreateResponse]:
|
|
43
40
|
"""
|
|
@@ -51,10 +48,16 @@ class RawToolsClient:
|
|
|
51
48
|
text : str
|
|
52
49
|
Natural language text to convert to FHIR resource
|
|
53
50
|
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
phenoml_on_behalf_of : typing.Optional[str]
|
|
52
|
+
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
53
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
56
54
|
|
|
57
|
-
|
|
55
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
56
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
57
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
58
|
+
|
|
59
|
+
provider : typing.Optional[str]
|
|
60
|
+
FHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum)
|
|
58
61
|
|
|
59
62
|
request_options : typing.Optional[RequestOptions]
|
|
60
63
|
Request-specific configuration.
|
|
@@ -71,12 +74,11 @@ class RawToolsClient:
|
|
|
71
74
|
"resource": resource,
|
|
72
75
|
"text": text,
|
|
73
76
|
"provider": provider,
|
|
74
|
-
"meta": convert_and_respect_annotation_metadata(
|
|
75
|
-
object_=meta, annotation=FhirClientConfig, direction="write"
|
|
76
|
-
),
|
|
77
77
|
},
|
|
78
78
|
headers={
|
|
79
79
|
"content-type": "application/json",
|
|
80
|
+
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
81
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
80
82
|
},
|
|
81
83
|
request_options=request_options,
|
|
82
84
|
omit=OMIT,
|
|
@@ -151,15 +153,146 @@ class RawToolsClient:
|
|
|
151
153
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
152
154
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
153
155
|
|
|
156
|
+
def create_fhir_resources_multi(
|
|
157
|
+
self,
|
|
158
|
+
*,
|
|
159
|
+
text: str,
|
|
160
|
+
provider: str,
|
|
161
|
+
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
162
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
163
|
+
version: typing.Optional[str] = OMIT,
|
|
164
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
165
|
+
) -> HttpResponse[Lang2FhirAndCreateMultiResponse]:
|
|
166
|
+
"""
|
|
167
|
+
Extracts multiple FHIR resources from natural language text and stores them in a FHIR server.
|
|
168
|
+
Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types.
|
|
169
|
+
Resources are linked with proper references and submitted as a transaction bundle.
|
|
170
|
+
For FHIR servers that don't auto-resolve urn:uuid references, this endpoint will automatically
|
|
171
|
+
resolve them via PUT requests after the initial bundle creation.
|
|
172
|
+
|
|
173
|
+
Parameters
|
|
174
|
+
----------
|
|
175
|
+
text : str
|
|
176
|
+
Natural language text containing multiple clinical concepts to extract
|
|
177
|
+
|
|
178
|
+
provider : str
|
|
179
|
+
FHIR provider ID or name
|
|
180
|
+
|
|
181
|
+
phenoml_on_behalf_of : typing.Optional[str]
|
|
182
|
+
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
183
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
184
|
+
|
|
185
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
186
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
187
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
188
|
+
|
|
189
|
+
version : typing.Optional[str]
|
|
190
|
+
FHIR version to use
|
|
191
|
+
|
|
192
|
+
request_options : typing.Optional[RequestOptions]
|
|
193
|
+
Request-specific configuration.
|
|
194
|
+
|
|
195
|
+
Returns
|
|
196
|
+
-------
|
|
197
|
+
HttpResponse[Lang2FhirAndCreateMultiResponse]
|
|
198
|
+
Successfully created FHIR resources
|
|
199
|
+
"""
|
|
200
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
201
|
+
"tools/lang2fhir-and-create-multi",
|
|
202
|
+
method="POST",
|
|
203
|
+
json={
|
|
204
|
+
"text": text,
|
|
205
|
+
"version": version,
|
|
206
|
+
"provider": provider,
|
|
207
|
+
},
|
|
208
|
+
headers={
|
|
209
|
+
"content-type": "application/json",
|
|
210
|
+
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
211
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
212
|
+
},
|
|
213
|
+
request_options=request_options,
|
|
214
|
+
omit=OMIT,
|
|
215
|
+
)
|
|
216
|
+
try:
|
|
217
|
+
if 200 <= _response.status_code < 300:
|
|
218
|
+
_data = typing.cast(
|
|
219
|
+
Lang2FhirAndCreateMultiResponse,
|
|
220
|
+
parse_obj_as(
|
|
221
|
+
type_=Lang2FhirAndCreateMultiResponse, # type: ignore
|
|
222
|
+
object_=_response.json(),
|
|
223
|
+
),
|
|
224
|
+
)
|
|
225
|
+
return HttpResponse(response=_response, data=_data)
|
|
226
|
+
if _response.status_code == 400:
|
|
227
|
+
raise BadRequestError(
|
|
228
|
+
headers=dict(_response.headers),
|
|
229
|
+
body=typing.cast(
|
|
230
|
+
typing.Optional[typing.Any],
|
|
231
|
+
parse_obj_as(
|
|
232
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
233
|
+
object_=_response.json(),
|
|
234
|
+
),
|
|
235
|
+
),
|
|
236
|
+
)
|
|
237
|
+
if _response.status_code == 401:
|
|
238
|
+
raise UnauthorizedError(
|
|
239
|
+
headers=dict(_response.headers),
|
|
240
|
+
body=typing.cast(
|
|
241
|
+
typing.Optional[typing.Any],
|
|
242
|
+
parse_obj_as(
|
|
243
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
244
|
+
object_=_response.json(),
|
|
245
|
+
),
|
|
246
|
+
),
|
|
247
|
+
)
|
|
248
|
+
if _response.status_code == 403:
|
|
249
|
+
raise ForbiddenError(
|
|
250
|
+
headers=dict(_response.headers),
|
|
251
|
+
body=typing.cast(
|
|
252
|
+
typing.Optional[typing.Any],
|
|
253
|
+
parse_obj_as(
|
|
254
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
255
|
+
object_=_response.json(),
|
|
256
|
+
),
|
|
257
|
+
),
|
|
258
|
+
)
|
|
259
|
+
if _response.status_code == 424:
|
|
260
|
+
raise FailedDependencyError(
|
|
261
|
+
headers=dict(_response.headers),
|
|
262
|
+
body=typing.cast(
|
|
263
|
+
typing.Optional[typing.Any],
|
|
264
|
+
parse_obj_as(
|
|
265
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
266
|
+
object_=_response.json(),
|
|
267
|
+
),
|
|
268
|
+
),
|
|
269
|
+
)
|
|
270
|
+
if _response.status_code == 500:
|
|
271
|
+
raise InternalServerError(
|
|
272
|
+
headers=dict(_response.headers),
|
|
273
|
+
body=typing.cast(
|
|
274
|
+
typing.Optional[typing.Any],
|
|
275
|
+
parse_obj_as(
|
|
276
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
277
|
+
object_=_response.json(),
|
|
278
|
+
),
|
|
279
|
+
),
|
|
280
|
+
)
|
|
281
|
+
_response_json = _response.json()
|
|
282
|
+
except JSONDecodeError:
|
|
283
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
284
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
285
|
+
|
|
154
286
|
def search_fhir_resources(
|
|
155
287
|
self,
|
|
156
288
|
*,
|
|
157
289
|
text: str,
|
|
290
|
+
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
291
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
158
292
|
patient_id: typing.Optional[str] = OMIT,
|
|
159
293
|
practitioner_id: typing.Optional[str] = OMIT,
|
|
160
294
|
count: typing.Optional[int] = OMIT,
|
|
161
|
-
provider: typing.Optional[
|
|
162
|
-
meta: typing.Optional[FhirClientConfig] = OMIT,
|
|
295
|
+
provider: typing.Optional[str] = OMIT,
|
|
163
296
|
request_options: typing.Optional[RequestOptions] = None,
|
|
164
297
|
) -> HttpResponse[Lang2FhirAndSearchResponse]:
|
|
165
298
|
"""
|
|
@@ -170,6 +303,14 @@ class RawToolsClient:
|
|
|
170
303
|
text : str
|
|
171
304
|
Natural language text to convert to FHIR search parameters
|
|
172
305
|
|
|
306
|
+
phenoml_on_behalf_of : typing.Optional[str]
|
|
307
|
+
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
308
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
309
|
+
|
|
310
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
311
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
312
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
313
|
+
|
|
173
314
|
patient_id : typing.Optional[str]
|
|
174
315
|
Patient ID to filter results
|
|
175
316
|
|
|
@@ -179,10 +320,8 @@ class RawToolsClient:
|
|
|
179
320
|
count : typing.Optional[int]
|
|
180
321
|
Maximum number of results to return
|
|
181
322
|
|
|
182
|
-
provider : typing.Optional[
|
|
183
|
-
FHIR provider
|
|
184
|
-
|
|
185
|
-
meta : typing.Optional[FhirClientConfig]
|
|
323
|
+
provider : typing.Optional[str]
|
|
324
|
+
FHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum)
|
|
186
325
|
|
|
187
326
|
request_options : typing.Optional[RequestOptions]
|
|
188
327
|
Request-specific configuration.
|
|
@@ -201,12 +340,11 @@ class RawToolsClient:
|
|
|
201
340
|
"practitioner_id": practitioner_id,
|
|
202
341
|
"count": count,
|
|
203
342
|
"provider": provider,
|
|
204
|
-
"meta": convert_and_respect_annotation_metadata(
|
|
205
|
-
object_=meta, annotation=FhirClientConfig, direction="write"
|
|
206
|
-
),
|
|
207
343
|
},
|
|
208
344
|
headers={
|
|
209
345
|
"content-type": "application/json",
|
|
346
|
+
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
347
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
210
348
|
},
|
|
211
349
|
request_options=request_options,
|
|
212
350
|
omit=OMIT,
|
|
@@ -285,8 +423,9 @@ class RawToolsClient:
|
|
|
285
423
|
self,
|
|
286
424
|
*,
|
|
287
425
|
text: str,
|
|
288
|
-
provider:
|
|
289
|
-
|
|
426
|
+
provider: str,
|
|
427
|
+
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
428
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
290
429
|
request_options: typing.Optional[RequestOptions] = None,
|
|
291
430
|
) -> HttpResponse[CohortResponse]:
|
|
292
431
|
"""
|
|
@@ -297,10 +436,16 @@ class RawToolsClient:
|
|
|
297
436
|
text : str
|
|
298
437
|
Natural language text describing the patient cohort criteria
|
|
299
438
|
|
|
300
|
-
provider :
|
|
301
|
-
FHIR provider
|
|
439
|
+
provider : str
|
|
440
|
+
FHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum)
|
|
441
|
+
|
|
442
|
+
phenoml_on_behalf_of : typing.Optional[str]
|
|
443
|
+
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
444
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
302
445
|
|
|
303
|
-
|
|
446
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
447
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
448
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
304
449
|
|
|
305
450
|
request_options : typing.Optional[RequestOptions]
|
|
306
451
|
Request-specific configuration.
|
|
@@ -316,12 +461,11 @@ class RawToolsClient:
|
|
|
316
461
|
json={
|
|
317
462
|
"text": text,
|
|
318
463
|
"provider": provider,
|
|
319
|
-
"meta": convert_and_respect_annotation_metadata(
|
|
320
|
-
object_=meta, annotation=FhirClientConfig, direction="write"
|
|
321
|
-
),
|
|
322
464
|
},
|
|
323
465
|
headers={
|
|
324
466
|
"content-type": "application/json",
|
|
467
|
+
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
468
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
325
469
|
},
|
|
326
470
|
request_options=request_options,
|
|
327
471
|
omit=OMIT,
|
|
@@ -395,8 +539,9 @@ class AsyncRawToolsClient:
|
|
|
395
539
|
*,
|
|
396
540
|
resource: Lang2FhirAndCreateRequestResource,
|
|
397
541
|
text: str,
|
|
398
|
-
|
|
399
|
-
|
|
542
|
+
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
543
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
544
|
+
provider: typing.Optional[str] = OMIT,
|
|
400
545
|
request_options: typing.Optional[RequestOptions] = None,
|
|
401
546
|
) -> AsyncHttpResponse[Lang2FhirAndCreateResponse]:
|
|
402
547
|
"""
|
|
@@ -410,10 +555,16 @@ class AsyncRawToolsClient:
|
|
|
410
555
|
text : str
|
|
411
556
|
Natural language text to convert to FHIR resource
|
|
412
557
|
|
|
413
|
-
|
|
414
|
-
|
|
558
|
+
phenoml_on_behalf_of : typing.Optional[str]
|
|
559
|
+
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
560
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
415
561
|
|
|
416
|
-
|
|
562
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
563
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
564
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
565
|
+
|
|
566
|
+
provider : typing.Optional[str]
|
|
567
|
+
FHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum)
|
|
417
568
|
|
|
418
569
|
request_options : typing.Optional[RequestOptions]
|
|
419
570
|
Request-specific configuration.
|
|
@@ -430,12 +581,11 @@ class AsyncRawToolsClient:
|
|
|
430
581
|
"resource": resource,
|
|
431
582
|
"text": text,
|
|
432
583
|
"provider": provider,
|
|
433
|
-
"meta": convert_and_respect_annotation_metadata(
|
|
434
|
-
object_=meta, annotation=FhirClientConfig, direction="write"
|
|
435
|
-
),
|
|
436
584
|
},
|
|
437
585
|
headers={
|
|
438
586
|
"content-type": "application/json",
|
|
587
|
+
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
588
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
439
589
|
},
|
|
440
590
|
request_options=request_options,
|
|
441
591
|
omit=OMIT,
|
|
@@ -510,15 +660,146 @@ class AsyncRawToolsClient:
|
|
|
510
660
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
511
661
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
512
662
|
|
|
663
|
+
async def create_fhir_resources_multi(
|
|
664
|
+
self,
|
|
665
|
+
*,
|
|
666
|
+
text: str,
|
|
667
|
+
provider: str,
|
|
668
|
+
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
669
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
670
|
+
version: typing.Optional[str] = OMIT,
|
|
671
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
672
|
+
) -> AsyncHttpResponse[Lang2FhirAndCreateMultiResponse]:
|
|
673
|
+
"""
|
|
674
|
+
Extracts multiple FHIR resources from natural language text and stores them in a FHIR server.
|
|
675
|
+
Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types.
|
|
676
|
+
Resources are linked with proper references and submitted as a transaction bundle.
|
|
677
|
+
For FHIR servers that don't auto-resolve urn:uuid references, this endpoint will automatically
|
|
678
|
+
resolve them via PUT requests after the initial bundle creation.
|
|
679
|
+
|
|
680
|
+
Parameters
|
|
681
|
+
----------
|
|
682
|
+
text : str
|
|
683
|
+
Natural language text containing multiple clinical concepts to extract
|
|
684
|
+
|
|
685
|
+
provider : str
|
|
686
|
+
FHIR provider ID or name
|
|
687
|
+
|
|
688
|
+
phenoml_on_behalf_of : typing.Optional[str]
|
|
689
|
+
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
690
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
691
|
+
|
|
692
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
693
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
694
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
695
|
+
|
|
696
|
+
version : typing.Optional[str]
|
|
697
|
+
FHIR version to use
|
|
698
|
+
|
|
699
|
+
request_options : typing.Optional[RequestOptions]
|
|
700
|
+
Request-specific configuration.
|
|
701
|
+
|
|
702
|
+
Returns
|
|
703
|
+
-------
|
|
704
|
+
AsyncHttpResponse[Lang2FhirAndCreateMultiResponse]
|
|
705
|
+
Successfully created FHIR resources
|
|
706
|
+
"""
|
|
707
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
708
|
+
"tools/lang2fhir-and-create-multi",
|
|
709
|
+
method="POST",
|
|
710
|
+
json={
|
|
711
|
+
"text": text,
|
|
712
|
+
"version": version,
|
|
713
|
+
"provider": provider,
|
|
714
|
+
},
|
|
715
|
+
headers={
|
|
716
|
+
"content-type": "application/json",
|
|
717
|
+
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
718
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
719
|
+
},
|
|
720
|
+
request_options=request_options,
|
|
721
|
+
omit=OMIT,
|
|
722
|
+
)
|
|
723
|
+
try:
|
|
724
|
+
if 200 <= _response.status_code < 300:
|
|
725
|
+
_data = typing.cast(
|
|
726
|
+
Lang2FhirAndCreateMultiResponse,
|
|
727
|
+
parse_obj_as(
|
|
728
|
+
type_=Lang2FhirAndCreateMultiResponse, # type: ignore
|
|
729
|
+
object_=_response.json(),
|
|
730
|
+
),
|
|
731
|
+
)
|
|
732
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
733
|
+
if _response.status_code == 400:
|
|
734
|
+
raise BadRequestError(
|
|
735
|
+
headers=dict(_response.headers),
|
|
736
|
+
body=typing.cast(
|
|
737
|
+
typing.Optional[typing.Any],
|
|
738
|
+
parse_obj_as(
|
|
739
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
740
|
+
object_=_response.json(),
|
|
741
|
+
),
|
|
742
|
+
),
|
|
743
|
+
)
|
|
744
|
+
if _response.status_code == 401:
|
|
745
|
+
raise UnauthorizedError(
|
|
746
|
+
headers=dict(_response.headers),
|
|
747
|
+
body=typing.cast(
|
|
748
|
+
typing.Optional[typing.Any],
|
|
749
|
+
parse_obj_as(
|
|
750
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
751
|
+
object_=_response.json(),
|
|
752
|
+
),
|
|
753
|
+
),
|
|
754
|
+
)
|
|
755
|
+
if _response.status_code == 403:
|
|
756
|
+
raise ForbiddenError(
|
|
757
|
+
headers=dict(_response.headers),
|
|
758
|
+
body=typing.cast(
|
|
759
|
+
typing.Optional[typing.Any],
|
|
760
|
+
parse_obj_as(
|
|
761
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
762
|
+
object_=_response.json(),
|
|
763
|
+
),
|
|
764
|
+
),
|
|
765
|
+
)
|
|
766
|
+
if _response.status_code == 424:
|
|
767
|
+
raise FailedDependencyError(
|
|
768
|
+
headers=dict(_response.headers),
|
|
769
|
+
body=typing.cast(
|
|
770
|
+
typing.Optional[typing.Any],
|
|
771
|
+
parse_obj_as(
|
|
772
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
773
|
+
object_=_response.json(),
|
|
774
|
+
),
|
|
775
|
+
),
|
|
776
|
+
)
|
|
777
|
+
if _response.status_code == 500:
|
|
778
|
+
raise InternalServerError(
|
|
779
|
+
headers=dict(_response.headers),
|
|
780
|
+
body=typing.cast(
|
|
781
|
+
typing.Optional[typing.Any],
|
|
782
|
+
parse_obj_as(
|
|
783
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
784
|
+
object_=_response.json(),
|
|
785
|
+
),
|
|
786
|
+
),
|
|
787
|
+
)
|
|
788
|
+
_response_json = _response.json()
|
|
789
|
+
except JSONDecodeError:
|
|
790
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
791
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
792
|
+
|
|
513
793
|
async def search_fhir_resources(
|
|
514
794
|
self,
|
|
515
795
|
*,
|
|
516
796
|
text: str,
|
|
797
|
+
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
798
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
517
799
|
patient_id: typing.Optional[str] = OMIT,
|
|
518
800
|
practitioner_id: typing.Optional[str] = OMIT,
|
|
519
801
|
count: typing.Optional[int] = OMIT,
|
|
520
|
-
provider: typing.Optional[
|
|
521
|
-
meta: typing.Optional[FhirClientConfig] = OMIT,
|
|
802
|
+
provider: typing.Optional[str] = OMIT,
|
|
522
803
|
request_options: typing.Optional[RequestOptions] = None,
|
|
523
804
|
) -> AsyncHttpResponse[Lang2FhirAndSearchResponse]:
|
|
524
805
|
"""
|
|
@@ -529,6 +810,14 @@ class AsyncRawToolsClient:
|
|
|
529
810
|
text : str
|
|
530
811
|
Natural language text to convert to FHIR search parameters
|
|
531
812
|
|
|
813
|
+
phenoml_on_behalf_of : typing.Optional[str]
|
|
814
|
+
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
815
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
816
|
+
|
|
817
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
818
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
819
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
820
|
+
|
|
532
821
|
patient_id : typing.Optional[str]
|
|
533
822
|
Patient ID to filter results
|
|
534
823
|
|
|
@@ -538,10 +827,8 @@ class AsyncRawToolsClient:
|
|
|
538
827
|
count : typing.Optional[int]
|
|
539
828
|
Maximum number of results to return
|
|
540
829
|
|
|
541
|
-
provider : typing.Optional[
|
|
542
|
-
FHIR provider
|
|
543
|
-
|
|
544
|
-
meta : typing.Optional[FhirClientConfig]
|
|
830
|
+
provider : typing.Optional[str]
|
|
831
|
+
FHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum)
|
|
545
832
|
|
|
546
833
|
request_options : typing.Optional[RequestOptions]
|
|
547
834
|
Request-specific configuration.
|
|
@@ -560,12 +847,11 @@ class AsyncRawToolsClient:
|
|
|
560
847
|
"practitioner_id": practitioner_id,
|
|
561
848
|
"count": count,
|
|
562
849
|
"provider": provider,
|
|
563
|
-
"meta": convert_and_respect_annotation_metadata(
|
|
564
|
-
object_=meta, annotation=FhirClientConfig, direction="write"
|
|
565
|
-
),
|
|
566
850
|
},
|
|
567
851
|
headers={
|
|
568
852
|
"content-type": "application/json",
|
|
853
|
+
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
854
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
569
855
|
},
|
|
570
856
|
request_options=request_options,
|
|
571
857
|
omit=OMIT,
|
|
@@ -644,8 +930,9 @@ class AsyncRawToolsClient:
|
|
|
644
930
|
self,
|
|
645
931
|
*,
|
|
646
932
|
text: str,
|
|
647
|
-
provider:
|
|
648
|
-
|
|
933
|
+
provider: str,
|
|
934
|
+
phenoml_on_behalf_of: typing.Optional[str] = None,
|
|
935
|
+
phenoml_fhir_provider: typing.Optional[str] = None,
|
|
649
936
|
request_options: typing.Optional[RequestOptions] = None,
|
|
650
937
|
) -> AsyncHttpResponse[CohortResponse]:
|
|
651
938
|
"""
|
|
@@ -656,10 +943,16 @@ class AsyncRawToolsClient:
|
|
|
656
943
|
text : str
|
|
657
944
|
Natural language text describing the patient cohort criteria
|
|
658
945
|
|
|
659
|
-
provider :
|
|
660
|
-
FHIR provider
|
|
946
|
+
provider : str
|
|
947
|
+
FHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum)
|
|
948
|
+
|
|
949
|
+
phenoml_on_behalf_of : typing.Optional[str]
|
|
950
|
+
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity.
|
|
951
|
+
Must be in the format: Patient/{uuid} or Practitioner/{uuid}
|
|
661
952
|
|
|
662
|
-
|
|
953
|
+
phenoml_fhir_provider : typing.Optional[str]
|
|
954
|
+
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}.
|
|
955
|
+
Multiple FHIR provider integrations can be provided as comma-separated values.
|
|
663
956
|
|
|
664
957
|
request_options : typing.Optional[RequestOptions]
|
|
665
958
|
Request-specific configuration.
|
|
@@ -675,12 +968,11 @@ class AsyncRawToolsClient:
|
|
|
675
968
|
json={
|
|
676
969
|
"text": text,
|
|
677
970
|
"provider": provider,
|
|
678
|
-
"meta": convert_and_respect_annotation_metadata(
|
|
679
|
-
object_=meta, annotation=FhirClientConfig, direction="write"
|
|
680
|
-
),
|
|
681
971
|
},
|
|
682
972
|
headers={
|
|
683
973
|
"content-type": "application/json",
|
|
974
|
+
"X-Phenoml-On-Behalf-Of": str(phenoml_on_behalf_of) if phenoml_on_behalf_of is not None else None,
|
|
975
|
+
"X-Phenoml-Fhir-Provider": str(phenoml_fhir_provider) if phenoml_fhir_provider is not None else None,
|
|
684
976
|
},
|
|
685
977
|
request_options=request_options,
|
|
686
978
|
omit=OMIT,
|
phenoml/tools/types/__init__.py
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
from .cohort_request_provider import CohortRequestProvider
|
|
6
5
|
from .cohort_response import CohortResponse
|
|
7
|
-
from .
|
|
8
|
-
from .
|
|
6
|
+
from .lang2fhir_and_create_multi_response import Lang2FhirAndCreateMultiResponse
|
|
7
|
+
from .lang2fhir_and_create_multi_response_resource_info_item import Lang2FhirAndCreateMultiResponseResourceInfoItem
|
|
8
|
+
from .lang2fhir_and_create_multi_response_response_bundle import Lang2FhirAndCreateMultiResponseResponseBundle
|
|
9
9
|
from .lang2fhir_and_create_request_resource import Lang2FhirAndCreateRequestResource
|
|
10
10
|
from .lang2fhir_and_create_response import Lang2FhirAndCreateResponse
|
|
11
|
-
from .lang2fhir_and_search_request_provider import Lang2FhirAndSearchRequestProvider
|
|
12
11
|
from .lang2fhir_and_search_response import Lang2FhirAndSearchResponse
|
|
13
12
|
from .mcp_server_response import McpServerResponse
|
|
14
13
|
from .mcp_server_response_data import McpServerResponseData
|
|
@@ -18,13 +17,12 @@ from .mcp_server_tool_response_data import McpServerToolResponseData
|
|
|
18
17
|
from .search_concept import SearchConcept
|
|
19
18
|
|
|
20
19
|
__all__ = [
|
|
21
|
-
"CohortRequestProvider",
|
|
22
20
|
"CohortResponse",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
21
|
+
"Lang2FhirAndCreateMultiResponse",
|
|
22
|
+
"Lang2FhirAndCreateMultiResponseResourceInfoItem",
|
|
23
|
+
"Lang2FhirAndCreateMultiResponseResponseBundle",
|
|
25
24
|
"Lang2FhirAndCreateRequestResource",
|
|
26
25
|
"Lang2FhirAndCreateResponse",
|
|
27
|
-
"Lang2FhirAndSearchRequestProvider",
|
|
28
26
|
"Lang2FhirAndSearchResponse",
|
|
29
27
|
"McpServerResponse",
|
|
30
28
|
"McpServerResponseData",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .lang2fhir_and_create_multi_response_resource_info_item import Lang2FhirAndCreateMultiResponseResourceInfoItem
|
|
8
|
+
from .lang2fhir_and_create_multi_response_response_bundle import Lang2FhirAndCreateMultiResponseResponseBundle
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Lang2FhirAndCreateMultiResponse(UniversalBaseModel):
|
|
12
|
+
success: typing.Optional[bool] = pydantic.Field(default=None)
|
|
13
|
+
"""
|
|
14
|
+
Whether the resources were created successfully
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
Status message
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
response_bundle: typing.Optional[Lang2FhirAndCreateMultiResponseResponseBundle] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
FHIR transaction-response Bundle from the server with resolved resource IDs
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
resource_info: typing.Optional[typing.List[Lang2FhirAndCreateMultiResponseResourceInfoItem]] = pydantic.Field(
|
|
28
|
+
default=None
|
|
29
|
+
)
|
|
30
|
+
"""
|
|
31
|
+
Metadata about created resources (temp IDs, types, descriptions)
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
if IS_PYDANTIC_V2:
|
|
35
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
36
|
+
else:
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
frozen = True
|
|
40
|
+
smart_union = True
|
|
41
|
+
extra = pydantic.Extra.allow
|