phenoml 0.0.6__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/__init__.py +30 -0
- phenoml/agent/__init__.py +56 -0
- phenoml/agent/client.py +939 -0
- phenoml/agent/errors/__init__.py +11 -0
- phenoml/agent/errors/bad_request_error.py +10 -0
- phenoml/agent/errors/forbidden_error.py +10 -0
- phenoml/agent/errors/internal_server_error.py +10 -0
- phenoml/agent/errors/not_found_error.py +10 -0
- phenoml/agent/errors/unauthorized_error.py +10 -0
- phenoml/agent/prompts/__init__.py +7 -0
- phenoml/agent/prompts/client.py +707 -0
- phenoml/agent/prompts/raw_client.py +1345 -0
- phenoml/agent/prompts/types/__init__.py +8 -0
- phenoml/agent/prompts/types/prompts_delete_response.py +20 -0
- phenoml/agent/prompts/types/prompts_list_response.py +22 -0
- phenoml/agent/raw_client.py +1668 -0
- phenoml/agent/types/__init__.py +43 -0
- phenoml/agent/types/agent_chat_response.py +33 -0
- phenoml/agent/types/agent_create_request.py +53 -0
- phenoml/agent/types/agent_create_request_provider.py +5 -0
- phenoml/agent/types/agent_delete_response.py +20 -0
- phenoml/agent/types/agent_get_chat_messages_request_order.py +5 -0
- phenoml/agent/types/agent_get_chat_messages_response.py +22 -0
- phenoml/agent/types/agent_list_response.py +22 -0
- phenoml/agent/types/agent_prompts_response.py +22 -0
- phenoml/agent/types/agent_response.py +22 -0
- phenoml/agent/types/agent_template.py +58 -0
- phenoml/agent/types/agent_template_provider.py +5 -0
- phenoml/agent/types/chat_message_template.py +72 -0
- phenoml/agent/types/chat_session_template.py +67 -0
- phenoml/agent/types/json_patch.py +7 -0
- phenoml/agent/types/json_patch_operation.py +40 -0
- phenoml/agent/types/json_patch_operation_op.py +5 -0
- phenoml/agent/types/prompt_template.py +52 -0
- phenoml/agent/types/success_response.py +20 -0
- phenoml/authtoken/__init__.py +17 -0
- phenoml/authtoken/auth/__init__.py +7 -0
- phenoml/authtoken/auth/client.py +129 -0
- phenoml/authtoken/auth/raw_client.py +173 -0
- phenoml/authtoken/auth/types/__init__.py +7 -0
- phenoml/authtoken/auth/types/auth_generate_token_response.py +22 -0
- phenoml/authtoken/client.py +39 -0
- phenoml/authtoken/errors/__init__.py +8 -0
- phenoml/authtoken/errors/bad_request_error.py +10 -0
- phenoml/authtoken/errors/unauthorized_error.py +10 -0
- phenoml/authtoken/raw_client.py +13 -0
- phenoml/authtoken/types/__init__.py +8 -0
- phenoml/authtoken/types/bad_request_error_body.py +21 -0
- phenoml/authtoken/types/unauthorized_error_body.py +21 -0
- phenoml/client.py +177 -0
- phenoml/cohort/__init__.py +8 -0
- phenoml/cohort/client.py +113 -0
- phenoml/cohort/errors/__init__.py +9 -0
- phenoml/cohort/errors/bad_request_error.py +10 -0
- phenoml/cohort/errors/internal_server_error.py +10 -0
- phenoml/cohort/errors/unauthorized_error.py +10 -0
- phenoml/cohort/raw_client.py +185 -0
- phenoml/cohort/types/__init__.py +8 -0
- phenoml/cohort/types/cohort_response.py +33 -0
- phenoml/cohort/types/search_concept.py +37 -0
- phenoml/construe/__init__.py +45 -0
- phenoml/construe/client.py +399 -0
- phenoml/construe/errors/__init__.py +11 -0
- phenoml/construe/errors/bad_request_error.py +10 -0
- phenoml/construe/errors/conflict_error.py +10 -0
- phenoml/construe/errors/failed_dependency_error.py +10 -0
- phenoml/construe/errors/internal_server_error.py +10 -0
- phenoml/construe/errors/unauthorized_error.py +10 -0
- phenoml/construe/raw_client.py +706 -0
- phenoml/construe/types/__init__.py +41 -0
- phenoml/construe/types/bad_request_error_body.py +27 -0
- phenoml/construe/types/construe_cohort_request_config.py +37 -0
- phenoml/construe/types/construe_cohort_response.py +33 -0
- phenoml/construe/types/construe_cohort_response_queries_item.py +49 -0
- phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item.py +31 -0
- phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item_codes_item.py +32 -0
- phenoml/construe/types/construe_upload_code_system_response.py +19 -0
- phenoml/construe/types/extract_codes_result.py +22 -0
- phenoml/construe/types/extract_request_config.py +23 -0
- phenoml/construe/types/extract_request_config_chunking_method.py +5 -0
- phenoml/construe/types/extract_request_system.py +37 -0
- phenoml/construe/types/extracted_code_result.py +41 -0
- phenoml/construe/types/internal_server_error_body.py +27 -0
- phenoml/construe/types/unauthorized_error_body.py +27 -0
- phenoml/construe/types/upload_request_format.py +5 -0
- phenoml/core/__init__.py +52 -0
- phenoml/core/api_error.py +23 -0
- phenoml/core/client_wrapper.py +87 -0
- phenoml/core/datetime_utils.py +28 -0
- phenoml/core/file.py +67 -0
- phenoml/core/force_multipart.py +16 -0
- phenoml/core/http_client.py +543 -0
- phenoml/core/http_response.py +55 -0
- phenoml/core/jsonable_encoder.py +100 -0
- phenoml/core/pydantic_utilities.py +255 -0
- phenoml/core/query_encoder.py +58 -0
- phenoml/core/remove_none_from_dict.py +11 -0
- phenoml/core/request_options.py +35 -0
- phenoml/core/serialization.py +276 -0
- phenoml/environment.py +7 -0
- phenoml/fhir/__init__.py +36 -0
- phenoml/fhir/client.py +970 -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 +1385 -0
- phenoml/fhir/types/__init__.py +29 -0
- phenoml/fhir/types/error_response.py +36 -0
- 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/fhir/types/fhir_bundle_entry_item_response.py +24 -0
- 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 +43 -0
- phenoml/fhir_provider/client.py +731 -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 +1445 -0
- phenoml/fhir_provider/types/__init__.py +35 -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/service_account_key.py +35 -0
- phenoml/fhir_provider/types/smart_configuration.py +46 -0
- phenoml/lang2fhir/__init__.py +27 -0
- phenoml/lang2fhir/client.py +430 -0
- phenoml/lang2fhir/errors/__init__.py +11 -0
- phenoml/lang2fhir/errors/bad_request_error.py +10 -0
- phenoml/lang2fhir/errors/failed_dependency_error.py +10 -0
- phenoml/lang2fhir/errors/forbidden_error.py +10 -0
- phenoml/lang2fhir/errors/internal_server_error.py +10 -0
- phenoml/lang2fhir/errors/unauthorized_error.py +10 -0
- phenoml/lang2fhir/raw_client.py +788 -0
- phenoml/lang2fhir/types/__init__.py +19 -0
- phenoml/lang2fhir/types/create_request_resource.py +25 -0
- phenoml/lang2fhir/types/document_request_file_type.py +7 -0
- phenoml/lang2fhir/types/document_request_resource.py +5 -0
- phenoml/lang2fhir/types/fhir_resource.py +5 -0
- phenoml/lang2fhir/types/lang2fhir_upload_profile_response.py +23 -0
- phenoml/lang2fhir/types/search_response.py +33 -0
- phenoml/py.typed +0 -0
- phenoml/tools/__init__.py +37 -0
- phenoml/tools/client.py +359 -0
- phenoml/tools/errors/__init__.py +11 -0
- phenoml/tools/errors/bad_request_error.py +10 -0
- phenoml/tools/errors/failed_dependency_error.py +10 -0
- phenoml/tools/errors/forbidden_error.py +10 -0
- phenoml/tools/errors/internal_server_error.py +10 -0
- phenoml/tools/errors/unauthorized_error.py +10 -0
- phenoml/tools/mcp_server/__init__.py +7 -0
- phenoml/tools/mcp_server/client.py +336 -0
- phenoml/tools/mcp_server/raw_client.py +641 -0
- phenoml/tools/mcp_server/tools/__init__.py +4 -0
- phenoml/tools/mcp_server/tools/client.py +358 -0
- phenoml/tools/mcp_server/tools/raw_client.py +656 -0
- phenoml/tools/raw_client.py +696 -0
- phenoml/tools/types/__init__.py +27 -0
- phenoml/tools/types/cohort_response.py +49 -0
- phenoml/tools/types/lang2fhir_and_create_request_resource.py +25 -0
- phenoml/tools/types/lang2fhir_and_create_response.py +33 -0
- phenoml/tools/types/lang2fhir_and_search_response.py +40 -0
- phenoml/tools/types/mcp_server_response.py +33 -0
- phenoml/tools/types/mcp_server_response_data.py +51 -0
- phenoml/tools/types/mcp_server_tool_call_response.py +37 -0
- phenoml/tools/types/mcp_server_tool_response.py +33 -0
- phenoml/tools/types/mcp_server_tool_response_data.py +61 -0
- phenoml/tools/types/search_concept.py +41 -0
- phenoml/types/__init__.py +21 -0
- phenoml/types/cohort_response.py +5 -0
- phenoml/types/lang2fhir_and_create_response.py +5 -0
- phenoml/types/lang2fhir_and_search_response.py +5 -0
- phenoml/types/mcp_server_response.py +5 -0
- phenoml/types/mcp_server_tool_call_response.py +5 -0
- phenoml/types/mcp_server_tool_response.py +5 -0
- phenoml/types/search_concept.py +5 -0
- phenoml/version.py +3 -0
- phenoml/workflows/__init__.py +66 -0
- phenoml/workflows/client.py +210 -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/mcp_server/__init__.py +7 -0
- phenoml/workflows/mcp_server/client.py +274 -0
- phenoml/workflows/mcp_server/raw_client.py +226 -0
- phenoml/workflows/mcp_server/tools/__init__.py +4 -0
- phenoml/workflows/mcp_server/tools/client.py +287 -0
- phenoml/workflows/mcp_server/tools/raw_client.py +244 -0
- phenoml/workflows/raw_client.py +169 -0
- phenoml/workflows/types/__init__.py +43 -0
- phenoml/workflows/types/create_workflow_response.py +44 -0
- phenoml/workflows/types/decision_node_definition.py +32 -0
- phenoml/workflows/types/execute_workflow_response.py +30 -0
- phenoml/workflows/types/execute_workflow_response_results.py +22 -0
- 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/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/workflows/__init__.py +19 -0
- phenoml/workflows/workflows/client.py +694 -0
- phenoml/workflows/workflows/raw_client.py +1266 -0
- phenoml/workflows/workflows/types/__init__.py +17 -0
- phenoml/workflows/workflows/types/create_workflow_request_fhir_provider_id.py +5 -0
- phenoml/workflows/workflows/types/update_workflow_request_fhir_provider_id.py +5 -0
- phenoml/workflows/workflows/types/workflows_delete_response.py +20 -0
- phenoml/workflows/workflows/types/workflows_get_response.py +26 -0
- phenoml/workflows/workflows/types/workflows_update_response.py +31 -0
- phenoml/wrapper_client.py +123 -0
- phenoml-0.0.6.dist-info/LICENSE +21 -0
- phenoml-0.0.6.dist-info/METADATA +192 -0
- phenoml-0.0.6.dist-info/RECORD +244 -0
- phenoml-0.0.6.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
5
|
+
|
|
6
|
+
from ....core.api_error import ApiError
|
|
7
|
+
from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from ....core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
|
+
from ....core.jsonable_encoder import jsonable_encoder
|
|
10
|
+
from ....core.request_options import RequestOptions
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class RawToolsClient:
|
|
14
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
15
|
+
self._client_wrapper = client_wrapper
|
|
16
|
+
|
|
17
|
+
def list(
|
|
18
|
+
self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
19
|
+
) -> HttpResponse[None]:
|
|
20
|
+
"""
|
|
21
|
+
Parameters
|
|
22
|
+
----------
|
|
23
|
+
mcp_server_id : str
|
|
24
|
+
|
|
25
|
+
request_options : typing.Optional[RequestOptions]
|
|
26
|
+
Request-specific configuration.
|
|
27
|
+
|
|
28
|
+
Returns
|
|
29
|
+
-------
|
|
30
|
+
HttpResponse[None]
|
|
31
|
+
"""
|
|
32
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
33
|
+
f"tools/mcp-server/{jsonable_encoder(mcp_server_id)}/list",
|
|
34
|
+
method="GET",
|
|
35
|
+
request_options=request_options,
|
|
36
|
+
)
|
|
37
|
+
try:
|
|
38
|
+
if 200 <= _response.status_code < 300:
|
|
39
|
+
return HttpResponse(response=_response, data=None)
|
|
40
|
+
_response_json = _response.json()
|
|
41
|
+
except JSONDecodeError:
|
|
42
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
43
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
44
|
+
|
|
45
|
+
def get(
|
|
46
|
+
self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
47
|
+
) -> HttpResponse[None]:
|
|
48
|
+
"""
|
|
49
|
+
Parameters
|
|
50
|
+
----------
|
|
51
|
+
mcp_server_tool_id : str
|
|
52
|
+
|
|
53
|
+
request_options : typing.Optional[RequestOptions]
|
|
54
|
+
Request-specific configuration.
|
|
55
|
+
|
|
56
|
+
Returns
|
|
57
|
+
-------
|
|
58
|
+
HttpResponse[None]
|
|
59
|
+
"""
|
|
60
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
61
|
+
f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}",
|
|
62
|
+
method="GET",
|
|
63
|
+
request_options=request_options,
|
|
64
|
+
)
|
|
65
|
+
try:
|
|
66
|
+
if 200 <= _response.status_code < 300:
|
|
67
|
+
return HttpResponse(response=_response, data=None)
|
|
68
|
+
_response_json = _response.json()
|
|
69
|
+
except JSONDecodeError:
|
|
70
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
71
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
72
|
+
|
|
73
|
+
def delete(
|
|
74
|
+
self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
75
|
+
) -> HttpResponse[None]:
|
|
76
|
+
"""
|
|
77
|
+
Parameters
|
|
78
|
+
----------
|
|
79
|
+
mcp_server_tool_id : str
|
|
80
|
+
|
|
81
|
+
request_options : typing.Optional[RequestOptions]
|
|
82
|
+
Request-specific configuration.
|
|
83
|
+
|
|
84
|
+
Returns
|
|
85
|
+
-------
|
|
86
|
+
HttpResponse[None]
|
|
87
|
+
"""
|
|
88
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
89
|
+
f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}",
|
|
90
|
+
method="DELETE",
|
|
91
|
+
request_options=request_options,
|
|
92
|
+
)
|
|
93
|
+
try:
|
|
94
|
+
if 200 <= _response.status_code < 300:
|
|
95
|
+
return HttpResponse(response=_response, data=None)
|
|
96
|
+
_response_json = _response.json()
|
|
97
|
+
except JSONDecodeError:
|
|
98
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
99
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
100
|
+
|
|
101
|
+
def call(
|
|
102
|
+
self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
103
|
+
) -> HttpResponse[None]:
|
|
104
|
+
"""
|
|
105
|
+
Parameters
|
|
106
|
+
----------
|
|
107
|
+
mcp_server_tool_id : str
|
|
108
|
+
|
|
109
|
+
request_options : typing.Optional[RequestOptions]
|
|
110
|
+
Request-specific configuration.
|
|
111
|
+
|
|
112
|
+
Returns
|
|
113
|
+
-------
|
|
114
|
+
HttpResponse[None]
|
|
115
|
+
"""
|
|
116
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
117
|
+
f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}/call",
|
|
118
|
+
method="POST",
|
|
119
|
+
request_options=request_options,
|
|
120
|
+
)
|
|
121
|
+
try:
|
|
122
|
+
if 200 <= _response.status_code < 300:
|
|
123
|
+
return HttpResponse(response=_response, data=None)
|
|
124
|
+
_response_json = _response.json()
|
|
125
|
+
except JSONDecodeError:
|
|
126
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
127
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class AsyncRawToolsClient:
|
|
131
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
132
|
+
self._client_wrapper = client_wrapper
|
|
133
|
+
|
|
134
|
+
async def list(
|
|
135
|
+
self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
136
|
+
) -> AsyncHttpResponse[None]:
|
|
137
|
+
"""
|
|
138
|
+
Parameters
|
|
139
|
+
----------
|
|
140
|
+
mcp_server_id : str
|
|
141
|
+
|
|
142
|
+
request_options : typing.Optional[RequestOptions]
|
|
143
|
+
Request-specific configuration.
|
|
144
|
+
|
|
145
|
+
Returns
|
|
146
|
+
-------
|
|
147
|
+
AsyncHttpResponse[None]
|
|
148
|
+
"""
|
|
149
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
150
|
+
f"tools/mcp-server/{jsonable_encoder(mcp_server_id)}/list",
|
|
151
|
+
method="GET",
|
|
152
|
+
request_options=request_options,
|
|
153
|
+
)
|
|
154
|
+
try:
|
|
155
|
+
if 200 <= _response.status_code < 300:
|
|
156
|
+
return AsyncHttpResponse(response=_response, data=None)
|
|
157
|
+
_response_json = _response.json()
|
|
158
|
+
except JSONDecodeError:
|
|
159
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
160
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
161
|
+
|
|
162
|
+
async def get(
|
|
163
|
+
self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
164
|
+
) -> AsyncHttpResponse[None]:
|
|
165
|
+
"""
|
|
166
|
+
Parameters
|
|
167
|
+
----------
|
|
168
|
+
mcp_server_tool_id : str
|
|
169
|
+
|
|
170
|
+
request_options : typing.Optional[RequestOptions]
|
|
171
|
+
Request-specific configuration.
|
|
172
|
+
|
|
173
|
+
Returns
|
|
174
|
+
-------
|
|
175
|
+
AsyncHttpResponse[None]
|
|
176
|
+
"""
|
|
177
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
178
|
+
f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}",
|
|
179
|
+
method="GET",
|
|
180
|
+
request_options=request_options,
|
|
181
|
+
)
|
|
182
|
+
try:
|
|
183
|
+
if 200 <= _response.status_code < 300:
|
|
184
|
+
return AsyncHttpResponse(response=_response, data=None)
|
|
185
|
+
_response_json = _response.json()
|
|
186
|
+
except JSONDecodeError:
|
|
187
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
188
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
189
|
+
|
|
190
|
+
async def delete(
|
|
191
|
+
self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
192
|
+
) -> AsyncHttpResponse[None]:
|
|
193
|
+
"""
|
|
194
|
+
Parameters
|
|
195
|
+
----------
|
|
196
|
+
mcp_server_tool_id : str
|
|
197
|
+
|
|
198
|
+
request_options : typing.Optional[RequestOptions]
|
|
199
|
+
Request-specific configuration.
|
|
200
|
+
|
|
201
|
+
Returns
|
|
202
|
+
-------
|
|
203
|
+
AsyncHttpResponse[None]
|
|
204
|
+
"""
|
|
205
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
206
|
+
f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}",
|
|
207
|
+
method="DELETE",
|
|
208
|
+
request_options=request_options,
|
|
209
|
+
)
|
|
210
|
+
try:
|
|
211
|
+
if 200 <= _response.status_code < 300:
|
|
212
|
+
return AsyncHttpResponse(response=_response, data=None)
|
|
213
|
+
_response_json = _response.json()
|
|
214
|
+
except JSONDecodeError:
|
|
215
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
216
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
217
|
+
|
|
218
|
+
async def call(
|
|
219
|
+
self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
220
|
+
) -> AsyncHttpResponse[None]:
|
|
221
|
+
"""
|
|
222
|
+
Parameters
|
|
223
|
+
----------
|
|
224
|
+
mcp_server_tool_id : str
|
|
225
|
+
|
|
226
|
+
request_options : typing.Optional[RequestOptions]
|
|
227
|
+
Request-specific configuration.
|
|
228
|
+
|
|
229
|
+
Returns
|
|
230
|
+
-------
|
|
231
|
+
AsyncHttpResponse[None]
|
|
232
|
+
"""
|
|
233
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
234
|
+
f"tools/mcp-server/tool/{jsonable_encoder(mcp_server_tool_id)}/call",
|
|
235
|
+
method="POST",
|
|
236
|
+
request_options=request_options,
|
|
237
|
+
)
|
|
238
|
+
try:
|
|
239
|
+
if 200 <= _response.status_code < 300:
|
|
240
|
+
return AsyncHttpResponse(response=_response, data=None)
|
|
241
|
+
_response_json = _response.json()
|
|
242
|
+
except JSONDecodeError:
|
|
243
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
244
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
5
|
+
|
|
6
|
+
from ..core.api_error import ApiError
|
|
7
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from ..core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
|
+
from ..core.request_options import RequestOptions
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class RawWorkflowsClient:
|
|
13
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
14
|
+
self._client_wrapper = client_wrapper
|
|
15
|
+
|
|
16
|
+
def create_fhir_resource(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]:
|
|
17
|
+
"""
|
|
18
|
+
Parameters
|
|
19
|
+
----------
|
|
20
|
+
request_options : typing.Optional[RequestOptions]
|
|
21
|
+
Request-specific configuration.
|
|
22
|
+
|
|
23
|
+
Returns
|
|
24
|
+
-------
|
|
25
|
+
HttpResponse[None]
|
|
26
|
+
"""
|
|
27
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
28
|
+
"tools/lang2fhir-and-create",
|
|
29
|
+
method="POST",
|
|
30
|
+
request_options=request_options,
|
|
31
|
+
)
|
|
32
|
+
try:
|
|
33
|
+
if 200 <= _response.status_code < 300:
|
|
34
|
+
return HttpResponse(response=_response, data=None)
|
|
35
|
+
_response_json = _response.json()
|
|
36
|
+
except JSONDecodeError:
|
|
37
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
38
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
39
|
+
|
|
40
|
+
def search_fhir_resources(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]:
|
|
41
|
+
"""
|
|
42
|
+
Parameters
|
|
43
|
+
----------
|
|
44
|
+
request_options : typing.Optional[RequestOptions]
|
|
45
|
+
Request-specific configuration.
|
|
46
|
+
|
|
47
|
+
Returns
|
|
48
|
+
-------
|
|
49
|
+
HttpResponse[None]
|
|
50
|
+
"""
|
|
51
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
52
|
+
"tools/lang2fhir-and-search",
|
|
53
|
+
method="POST",
|
|
54
|
+
request_options=request_options,
|
|
55
|
+
)
|
|
56
|
+
try:
|
|
57
|
+
if 200 <= _response.status_code < 300:
|
|
58
|
+
return HttpResponse(response=_response, data=None)
|
|
59
|
+
_response_json = _response.json()
|
|
60
|
+
except JSONDecodeError:
|
|
61
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
62
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
63
|
+
|
|
64
|
+
def analyze_cohort(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]:
|
|
65
|
+
"""
|
|
66
|
+
Parameters
|
|
67
|
+
----------
|
|
68
|
+
request_options : typing.Optional[RequestOptions]
|
|
69
|
+
Request-specific configuration.
|
|
70
|
+
|
|
71
|
+
Returns
|
|
72
|
+
-------
|
|
73
|
+
HttpResponse[None]
|
|
74
|
+
"""
|
|
75
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
76
|
+
"tools/cohort",
|
|
77
|
+
method="POST",
|
|
78
|
+
request_options=request_options,
|
|
79
|
+
)
|
|
80
|
+
try:
|
|
81
|
+
if 200 <= _response.status_code < 300:
|
|
82
|
+
return HttpResponse(response=_response, data=None)
|
|
83
|
+
_response_json = _response.json()
|
|
84
|
+
except JSONDecodeError:
|
|
85
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
86
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class AsyncRawWorkflowsClient:
|
|
90
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
91
|
+
self._client_wrapper = client_wrapper
|
|
92
|
+
|
|
93
|
+
async def create_fhir_resource(
|
|
94
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
95
|
+
) -> AsyncHttpResponse[None]:
|
|
96
|
+
"""
|
|
97
|
+
Parameters
|
|
98
|
+
----------
|
|
99
|
+
request_options : typing.Optional[RequestOptions]
|
|
100
|
+
Request-specific configuration.
|
|
101
|
+
|
|
102
|
+
Returns
|
|
103
|
+
-------
|
|
104
|
+
AsyncHttpResponse[None]
|
|
105
|
+
"""
|
|
106
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
107
|
+
"tools/lang2fhir-and-create",
|
|
108
|
+
method="POST",
|
|
109
|
+
request_options=request_options,
|
|
110
|
+
)
|
|
111
|
+
try:
|
|
112
|
+
if 200 <= _response.status_code < 300:
|
|
113
|
+
return AsyncHttpResponse(response=_response, data=None)
|
|
114
|
+
_response_json = _response.json()
|
|
115
|
+
except JSONDecodeError:
|
|
116
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
117
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
118
|
+
|
|
119
|
+
async def search_fhir_resources(
|
|
120
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
121
|
+
) -> AsyncHttpResponse[None]:
|
|
122
|
+
"""
|
|
123
|
+
Parameters
|
|
124
|
+
----------
|
|
125
|
+
request_options : typing.Optional[RequestOptions]
|
|
126
|
+
Request-specific configuration.
|
|
127
|
+
|
|
128
|
+
Returns
|
|
129
|
+
-------
|
|
130
|
+
AsyncHttpResponse[None]
|
|
131
|
+
"""
|
|
132
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
133
|
+
"tools/lang2fhir-and-search",
|
|
134
|
+
method="POST",
|
|
135
|
+
request_options=request_options,
|
|
136
|
+
)
|
|
137
|
+
try:
|
|
138
|
+
if 200 <= _response.status_code < 300:
|
|
139
|
+
return AsyncHttpResponse(response=_response, data=None)
|
|
140
|
+
_response_json = _response.json()
|
|
141
|
+
except JSONDecodeError:
|
|
142
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
143
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
144
|
+
|
|
145
|
+
async def analyze_cohort(
|
|
146
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
147
|
+
) -> AsyncHttpResponse[None]:
|
|
148
|
+
"""
|
|
149
|
+
Parameters
|
|
150
|
+
----------
|
|
151
|
+
request_options : typing.Optional[RequestOptions]
|
|
152
|
+
Request-specific configuration.
|
|
153
|
+
|
|
154
|
+
Returns
|
|
155
|
+
-------
|
|
156
|
+
AsyncHttpResponse[None]
|
|
157
|
+
"""
|
|
158
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
159
|
+
"tools/cohort",
|
|
160
|
+
method="POST",
|
|
161
|
+
request_options=request_options,
|
|
162
|
+
)
|
|
163
|
+
try:
|
|
164
|
+
if 200 <= _response.status_code < 300:
|
|
165
|
+
return AsyncHttpResponse(response=_response, data=None)
|
|
166
|
+
_response_json = _response.json()
|
|
167
|
+
except JSONDecodeError:
|
|
168
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
169
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .create_workflow_response import CreateWorkflowResponse
|
|
6
|
+
from .decision_node_definition import DecisionNodeDefinition
|
|
7
|
+
from .execute_workflow_response import ExecuteWorkflowResponse
|
|
8
|
+
from .execute_workflow_response_results import ExecuteWorkflowResponseResults
|
|
9
|
+
from .lang2fhir_create_definition import Lang2FhirCreateDefinition
|
|
10
|
+
from .lang2fhir_search_definition import Lang2FhirSearchDefinition
|
|
11
|
+
from .list_workflows_response import ListWorkflowsResponse
|
|
12
|
+
from .step_operation import StepOperation
|
|
13
|
+
from .sub_workflow_definition import SubWorkflowDefinition
|
|
14
|
+
from .workflow_config import WorkflowConfig
|
|
15
|
+
from .workflow_definition import WorkflowDefinition
|
|
16
|
+
from .workflow_graph import WorkflowGraph
|
|
17
|
+
from .workflow_response import WorkflowResponse
|
|
18
|
+
from .workflow_response_graph import WorkflowResponseGraph
|
|
19
|
+
from .workflow_step import WorkflowStep
|
|
20
|
+
from .workflow_step_summary import WorkflowStepSummary
|
|
21
|
+
from .workflow_step_summary_type import WorkflowStepSummaryType
|
|
22
|
+
from .workflow_step_type import WorkflowStepType
|
|
23
|
+
|
|
24
|
+
__all__ = [
|
|
25
|
+
"CreateWorkflowResponse",
|
|
26
|
+
"DecisionNodeDefinition",
|
|
27
|
+
"ExecuteWorkflowResponse",
|
|
28
|
+
"ExecuteWorkflowResponseResults",
|
|
29
|
+
"Lang2FhirCreateDefinition",
|
|
30
|
+
"Lang2FhirSearchDefinition",
|
|
31
|
+
"ListWorkflowsResponse",
|
|
32
|
+
"StepOperation",
|
|
33
|
+
"SubWorkflowDefinition",
|
|
34
|
+
"WorkflowConfig",
|
|
35
|
+
"WorkflowDefinition",
|
|
36
|
+
"WorkflowGraph",
|
|
37
|
+
"WorkflowResponse",
|
|
38
|
+
"WorkflowResponseGraph",
|
|
39
|
+
"WorkflowStep",
|
|
40
|
+
"WorkflowStepSummary",
|
|
41
|
+
"WorkflowStepSummaryType",
|
|
42
|
+
"WorkflowStepType",
|
|
43
|
+
]
|
|
@@ -0,0 +1,44 @@
|
|
|
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 .workflow_definition import WorkflowDefinition
|
|
8
|
+
from .workflow_response import WorkflowResponse
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CreateWorkflowResponse(UniversalBaseModel):
|
|
12
|
+
success: typing.Optional[bool] = pydantic.Field(default=None)
|
|
13
|
+
"""
|
|
14
|
+
Whether the workflow was created successfully
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
Status message
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
workflow_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
ID of the created workflow
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
workflow: typing.Optional[WorkflowResponse] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
Simplified workflow response with only essential step information
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
workflow_details: typing.Optional[WorkflowDefinition] = pydantic.Field(default=None)
|
|
33
|
+
"""
|
|
34
|
+
Only included when verbose=true - contains full implementation details including operation definitions and placeholders
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
if IS_PYDANTIC_V2:
|
|
38
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
39
|
+
else:
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
frozen = True
|
|
43
|
+
smart_union = True
|
|
44
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class DecisionNodeDefinition(UniversalBaseModel):
|
|
10
|
+
expression: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
Simple equality expression for decision logic
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
paths: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
Maps decision outcomes to next step IDs
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
runtime_placeholders: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
Maps placeholder tokens to their input data paths for decision evaluation
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
if IS_PYDANTIC_V2:
|
|
26
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
27
|
+
else:
|
|
28
|
+
|
|
29
|
+
class Config:
|
|
30
|
+
frozen = True
|
|
31
|
+
smart_union = True
|
|
32
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,30 @@
|
|
|
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 .execute_workflow_response_results import ExecuteWorkflowResponseResults
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ExecuteWorkflowResponse(UniversalBaseModel):
|
|
11
|
+
success: typing.Optional[bool] = pydantic.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
Whether the workflow execution was successful
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
Status message with execution details
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
results: typing.Optional[ExecuteWorkflowResponseResults] = None
|
|
22
|
+
|
|
23
|
+
if IS_PYDANTIC_V2:
|
|
24
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
25
|
+
else:
|
|
26
|
+
|
|
27
|
+
class Config:
|
|
28
|
+
frozen = True
|
|
29
|
+
smart_union = True
|
|
30
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class ExecuteWorkflowResponseResults(UniversalBaseModel):
|
|
10
|
+
steps: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
Results for each executed workflow step, keyed by step ID
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class Lang2FhirCreateDefinition(UniversalBaseModel):
|
|
10
|
+
original_description: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
Original natural language description
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
resource_type: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
FHIR resource type to create
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
resource_template: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
Prepared FHIR resource template
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
runtime_placeholders: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
Maps placeholder tokens to their input data paths
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
if IS_PYDANTIC_V2:
|
|
31
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
32
|
+
else:
|
|
33
|
+
|
|
34
|
+
class Config:
|
|
35
|
+
frozen = True
|
|
36
|
+
smart_union = True
|
|
37
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class Lang2FhirSearchDefinition(UniversalBaseModel):
|
|
10
|
+
original_query: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
Original natural language query
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
resource_type: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
FHIR resource type to search
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
search_parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
Prepared FHIR search parameters
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
required_fields: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
Fields needed from search results
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
runtime_placeholders: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
Maps placeholder tokens to their input data paths
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
if IS_PYDANTIC_V2:
|
|
36
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
37
|
+
else:
|
|
38
|
+
|
|
39
|
+
class Config:
|
|
40
|
+
frozen = True
|
|
41
|
+
smart_union = True
|
|
42
|
+
extra = pydantic.Extra.allow
|