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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .create_workflow_request_fhir_provider_id import CreateWorkflowRequestFhirProviderId
|
|
6
|
+
from .create_workflow_response import CreateWorkflowResponse
|
|
7
|
+
from .decision_node_definition import DecisionNodeDefinition
|
|
8
|
+
from .execute_workflow_response import ExecuteWorkflowResponse
|
|
9
|
+
from .execute_workflow_response_results import ExecuteWorkflowResponseResults
|
|
10
|
+
from .lang2fhir_create_definition import Lang2FhirCreateDefinition
|
|
11
|
+
from .lang2fhir_search_definition import Lang2FhirSearchDefinition
|
|
12
|
+
from .list_workflows_response import ListWorkflowsResponse
|
|
13
|
+
from .step_operation import StepOperation
|
|
14
|
+
from .sub_workflow_definition import SubWorkflowDefinition
|
|
15
|
+
from .update_workflow_request_fhir_provider_id import UpdateWorkflowRequestFhirProviderId
|
|
16
|
+
from .workflow_config import WorkflowConfig
|
|
17
|
+
from .workflow_definition import WorkflowDefinition
|
|
18
|
+
from .workflow_graph import WorkflowGraph
|
|
19
|
+
from .workflow_response import WorkflowResponse
|
|
20
|
+
from .workflow_response_graph import WorkflowResponseGraph
|
|
21
|
+
from .workflow_step import WorkflowStep
|
|
22
|
+
from .workflow_step_summary import WorkflowStepSummary
|
|
23
|
+
from .workflow_step_summary_type import WorkflowStepSummaryType
|
|
24
|
+
from .workflow_step_type import WorkflowStepType
|
|
25
|
+
from .workflows_delete_response import WorkflowsDeleteResponse
|
|
26
|
+
from .workflows_get_response import WorkflowsGetResponse
|
|
27
|
+
from .workflows_update_response import WorkflowsUpdateResponse
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
"CreateWorkflowRequestFhirProviderId",
|
|
31
|
+
"CreateWorkflowResponse",
|
|
32
|
+
"DecisionNodeDefinition",
|
|
33
|
+
"ExecuteWorkflowResponse",
|
|
34
|
+
"ExecuteWorkflowResponseResults",
|
|
35
|
+
"Lang2FhirCreateDefinition",
|
|
36
|
+
"Lang2FhirSearchDefinition",
|
|
37
|
+
"ListWorkflowsResponse",
|
|
38
|
+
"StepOperation",
|
|
39
|
+
"SubWorkflowDefinition",
|
|
40
|
+
"UpdateWorkflowRequestFhirProviderId",
|
|
41
|
+
"WorkflowConfig",
|
|
42
|
+
"WorkflowDefinition",
|
|
43
|
+
"WorkflowGraph",
|
|
44
|
+
"WorkflowResponse",
|
|
45
|
+
"WorkflowResponseGraph",
|
|
46
|
+
"WorkflowStep",
|
|
47
|
+
"WorkflowStepSummary",
|
|
48
|
+
"WorkflowStepSummaryType",
|
|
49
|
+
"WorkflowStepType",
|
|
50
|
+
"WorkflowsDeleteResponse",
|
|
51
|
+
"WorkflowsGetResponse",
|
|
52
|
+
"WorkflowsUpdateResponse",
|
|
53
|
+
]
|
|
@@ -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
|
|
@@ -6,19 +6,20 @@ import pydantic
|
|
|
6
6
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class DecisionNodeDefinition(UniversalBaseModel):
|
|
10
|
+
expression: typing.Optional[str] = pydantic.Field(default=None)
|
|
10
11
|
"""
|
|
11
|
-
|
|
12
|
+
Simple equality expression for decision logic
|
|
12
13
|
"""
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
paths: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
|
|
15
16
|
"""
|
|
16
|
-
|
|
17
|
+
Maps decision outcomes to next step IDs
|
|
17
18
|
"""
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
runtime_placeholders: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
|
|
20
21
|
"""
|
|
21
|
-
|
|
22
|
+
Maps placeholder tokens to their input data paths for decision evaluation
|
|
22
23
|
"""
|
|
23
24
|
|
|
24
25
|
if IS_PYDANTIC_V2:
|
|
@@ -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
|
|
@@ -6,15 +6,10 @@ import pydantic
|
|
|
6
6
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
10
|
-
|
|
9
|
+
class ExecuteWorkflowResponseResults(UniversalBaseModel):
|
|
10
|
+
steps: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
11
11
|
"""
|
|
12
|
-
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
-
"""
|
|
17
|
-
Error message.
|
|
12
|
+
Results for each executed workflow step, keyed by step ID
|
|
18
13
|
"""
|
|
19
14
|
|
|
20
15
|
if IS_PYDANTIC_V2:
|
|
@@ -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
|
|
@@ -0,0 +1,39 @@
|
|
|
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 ListWorkflowsResponse(UniversalBaseModel):
|
|
12
|
+
success: typing.Optional[bool] = pydantic.Field(default=None)
|
|
13
|
+
"""
|
|
14
|
+
Whether the workflow list was retrieved successfully
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
Status message
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
workflows: typing.Optional[typing.List[WorkflowResponse]] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
Array of simplified workflow responses for the authenticated user
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
workflow_details: typing.Optional[typing.List[WorkflowDefinition]] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
Only included when verbose=true - contains full implementation details for all workflows
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
if IS_PYDANTIC_V2:
|
|
33
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
34
|
+
else:
|
|
35
|
+
|
|
36
|
+
class Config:
|
|
37
|
+
frozen = True
|
|
38
|
+
smart_union = True
|
|
39
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,26 @@
|
|
|
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 .decision_node_definition import DecisionNodeDefinition
|
|
8
|
+
from .lang2fhir_create_definition import Lang2FhirCreateDefinition
|
|
9
|
+
from .lang2fhir_search_definition import Lang2FhirSearchDefinition
|
|
10
|
+
from .sub_workflow_definition import SubWorkflowDefinition
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class StepOperation(UniversalBaseModel):
|
|
14
|
+
search_definition: typing.Optional[Lang2FhirSearchDefinition] = None
|
|
15
|
+
create_definition: typing.Optional[Lang2FhirCreateDefinition] = None
|
|
16
|
+
workflow_definition: typing.Optional[SubWorkflowDefinition] = None
|
|
17
|
+
decision_definition: typing.Optional[DecisionNodeDefinition] = None
|
|
18
|
+
|
|
19
|
+
if IS_PYDANTIC_V2:
|
|
20
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
21
|
+
else:
|
|
22
|
+
|
|
23
|
+
class Config:
|
|
24
|
+
frozen = True
|
|
25
|
+
smart_union = True
|
|
26
|
+
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 SubWorkflowDefinition(UniversalBaseModel):
|
|
10
|
+
workflow_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
ID of the workflow to execute as a sub-workflow
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
input: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
Input data to pass to the sub-workflow
|
|
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 sub-workflow
|
|
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,27 @@
|
|
|
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 WorkflowConfig(UniversalBaseModel):
|
|
10
|
+
fhir_provider_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
FHIR provider IDs for executing workflow steps
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
dynamic_generation: typing.Optional[bool] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
Whether to use dynamic lang2fhir generation instead of pre-populated templates
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .workflow_config import WorkflowConfig
|
|
9
|
+
from .workflow_graph import WorkflowGraph
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WorkflowDefinition(UniversalBaseModel):
|
|
13
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
14
|
+
"""
|
|
15
|
+
Unique identifier for the workflow
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
user_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
19
|
+
"""
|
|
20
|
+
ID of the user who created the workflow
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
24
|
+
"""
|
|
25
|
+
Human-readable name for the workflow
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
workflow_instructions: typing.Optional[str] = pydantic.Field(default=None)
|
|
29
|
+
"""
|
|
30
|
+
Natural language instructions that define the workflow logic
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
sample_data: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
34
|
+
"""
|
|
35
|
+
Sample data used for workflow graph generation
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
config: typing.Optional[WorkflowConfig] = None
|
|
39
|
+
graph: typing.Optional[WorkflowGraph] = None
|
|
40
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
41
|
+
"""
|
|
42
|
+
Timestamp when the workflow was created
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
46
|
+
"""
|
|
47
|
+
Timestamp when the workflow was last updated
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
if IS_PYDANTIC_V2:
|
|
51
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
52
|
+
else:
|
|
53
|
+
|
|
54
|
+
class Config:
|
|
55
|
+
frozen = True
|
|
56
|
+
smart_union = True
|
|
57
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,23 @@
|
|
|
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_step import WorkflowStep
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WorkflowGraph(UniversalBaseModel):
|
|
11
|
+
steps: typing.Optional[typing.List[WorkflowStep]] = pydantic.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
Ordered list of workflow execution steps
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .workflow_config import WorkflowConfig
|
|
9
|
+
from .workflow_response_graph import WorkflowResponseGraph
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WorkflowResponse(UniversalBaseModel):
|
|
13
|
+
"""
|
|
14
|
+
Simplified workflow representation without implementation details
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
Unique identifier for the workflow
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
user_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
ID of the user who created the workflow
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
Human-readable name for the workflow
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
workflow_instructions: typing.Optional[str] = pydantic.Field(default=None)
|
|
33
|
+
"""
|
|
34
|
+
Natural language instructions that define the workflow logic
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
sample_data: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
38
|
+
"""
|
|
39
|
+
Sample data used for workflow graph generation
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
config: typing.Optional[WorkflowConfig] = None
|
|
43
|
+
graph: typing.Optional[WorkflowResponseGraph] = None
|
|
44
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
45
|
+
"""
|
|
46
|
+
Timestamp when the workflow was created
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
50
|
+
"""
|
|
51
|
+
Timestamp when the workflow was last updated
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
if IS_PYDANTIC_V2:
|
|
55
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
56
|
+
else:
|
|
57
|
+
|
|
58
|
+
class Config:
|
|
59
|
+
frozen = True
|
|
60
|
+
smart_union = True
|
|
61
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,23 @@
|
|
|
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_step_summary import WorkflowStepSummary
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WorkflowResponseGraph(UniversalBaseModel):
|
|
11
|
+
steps: typing.Optional[typing.List[WorkflowStepSummary]] = pydantic.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
Simplified list of workflow steps without operation details
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,55 @@
|
|
|
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 .step_operation import StepOperation
|
|
8
|
+
from .workflow_step_type import WorkflowStepType
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class WorkflowStep(UniversalBaseModel):
|
|
12
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
13
|
+
"""
|
|
14
|
+
Unique identifier for the step
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
Human-readable name for the step
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
Detailed description of what the step does
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
type: typing.Optional[WorkflowStepType] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
Type of operation this step performs
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
operation: typing.Optional[StepOperation] = None
|
|
33
|
+
provider_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
34
|
+
"""
|
|
35
|
+
Selected FHIR provider ID for this step
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
dependencies: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
39
|
+
"""
|
|
40
|
+
IDs of steps this step depends on
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
dynamic_generation: typing.Optional[bool] = pydantic.Field(default=None)
|
|
44
|
+
"""
|
|
45
|
+
Whether to use dynamic lang2fhir generation for this step
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
if IS_PYDANTIC_V2:
|
|
49
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
50
|
+
else:
|
|
51
|
+
|
|
52
|
+
class Config:
|
|
53
|
+
frozen = True
|
|
54
|
+
smart_union = True
|
|
55
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,47 @@
|
|
|
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_step_summary_type import WorkflowStepSummaryType
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WorkflowStepSummary(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Simplified workflow step without implementation details
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
Unique identifier for the step
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
Human-readable name for the step
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
Detailed description of what the step does
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
type: typing.Optional[WorkflowStepSummaryType] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
Type of operation this step performs
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
provider_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
36
|
+
"""
|
|
37
|
+
Selected FHIR provider ID for this step
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
if IS_PYDANTIC_V2:
|
|
41
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
42
|
+
else:
|
|
43
|
+
|
|
44
|
+
class Config:
|
|
45
|
+
frozen = True
|
|
46
|
+
smart_union = True
|
|
47
|
+
extra = pydantic.Extra.allow
|