phenoml 0.0.6__py3-none-any.whl → 0.0.8__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.
Files changed (54) hide show
  1. phenoml/client.py +3 -0
  2. phenoml/core/client_wrapper.py +2 -2
  3. phenoml/summary/__init__.py +39 -0
  4. phenoml/summary/client.py +656 -0
  5. phenoml/summary/errors/__init__.py +11 -0
  6. phenoml/summary/errors/bad_request_error.py +10 -0
  7. phenoml/summary/errors/forbidden_error.py +10 -0
  8. phenoml/summary/errors/internal_server_error.py +10 -0
  9. phenoml/summary/errors/not_found_error.py +10 -0
  10. phenoml/summary/errors/unauthorized_error.py +10 -0
  11. phenoml/{workflows/workflows → summary}/raw_client.py +236 -312
  12. phenoml/summary/types/__init__.py +31 -0
  13. phenoml/summary/types/create_summary_request_fhir_resources.py +8 -0
  14. phenoml/summary/types/create_summary_request_mode.py +5 -0
  15. phenoml/summary/types/create_summary_response.py +29 -0
  16. phenoml/summary/types/create_summary_template_response.py +23 -0
  17. phenoml/summary/types/fhir_bundle.py +23 -0
  18. phenoml/summary/types/fhir_bundle_entry_item.py +20 -0
  19. phenoml/summary/types/fhir_resource.py +24 -0
  20. phenoml/summary/types/summary_delete_template_response.py +20 -0
  21. phenoml/summary/types/summary_get_template_response.py +21 -0
  22. phenoml/summary/types/summary_list_templates_response.py +21 -0
  23. phenoml/summary/types/summary_template.py +41 -0
  24. phenoml/summary/types/summary_update_template_response.py +22 -0
  25. phenoml/workflows/__init__.py +3 -8
  26. phenoml/workflows/client.py +517 -33
  27. phenoml/workflows/raw_client.py +1129 -32
  28. phenoml/workflows/types/__init__.py +10 -0
  29. phenoml/workflows/{workflows/types → types}/workflows_delete_response.py +1 -1
  30. phenoml/workflows/{workflows/types → types}/workflows_get_response.py +3 -3
  31. phenoml/workflows/{workflows/types → types}/workflows_update_response.py +3 -3
  32. {phenoml-0.0.6.dist-info → phenoml-0.0.8.dist-info}/METADATA +1 -1
  33. {phenoml-0.0.6.dist-info → phenoml-0.0.8.dist-info}/RECORD +37 -33
  34. phenoml/types/__init__.py +0 -21
  35. phenoml/types/cohort_response.py +0 -5
  36. phenoml/types/lang2fhir_and_create_response.py +0 -5
  37. phenoml/types/lang2fhir_and_search_response.py +0 -5
  38. phenoml/types/mcp_server_response.py +0 -5
  39. phenoml/types/mcp_server_tool_call_response.py +0 -5
  40. phenoml/types/mcp_server_tool_response.py +0 -5
  41. phenoml/types/search_concept.py +0 -5
  42. phenoml/workflows/mcp_server/__init__.py +0 -7
  43. phenoml/workflows/mcp_server/client.py +0 -274
  44. phenoml/workflows/mcp_server/raw_client.py +0 -226
  45. phenoml/workflows/mcp_server/tools/__init__.py +0 -4
  46. phenoml/workflows/mcp_server/tools/client.py +0 -287
  47. phenoml/workflows/mcp_server/tools/raw_client.py +0 -244
  48. phenoml/workflows/workflows/__init__.py +0 -19
  49. phenoml/workflows/workflows/client.py +0 -694
  50. phenoml/workflows/workflows/types/__init__.py +0 -17
  51. /phenoml/workflows/{workflows/types → types}/create_workflow_request_fhir_provider_id.py +0 -0
  52. /phenoml/workflows/{workflows/types → types}/update_workflow_request_fhir_provider_id.py +0 -0
  53. {phenoml-0.0.6.dist-info → phenoml-0.0.8.dist-info}/LICENSE +0 -0
  54. {phenoml-0.0.6.dist-info → phenoml-0.0.8.dist-info}/WHEEL +0 -0
@@ -0,0 +1,31 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ from .create_summary_request_fhir_resources import CreateSummaryRequestFhirResources
6
+ from .create_summary_request_mode import CreateSummaryRequestMode
7
+ from .create_summary_response import CreateSummaryResponse
8
+ from .create_summary_template_response import CreateSummaryTemplateResponse
9
+ from .fhir_bundle import FhirBundle
10
+ from .fhir_bundle_entry_item import FhirBundleEntryItem
11
+ from .fhir_resource import FhirResource
12
+ from .summary_delete_template_response import SummaryDeleteTemplateResponse
13
+ from .summary_get_template_response import SummaryGetTemplateResponse
14
+ from .summary_list_templates_response import SummaryListTemplatesResponse
15
+ from .summary_template import SummaryTemplate
16
+ from .summary_update_template_response import SummaryUpdateTemplateResponse
17
+
18
+ __all__ = [
19
+ "CreateSummaryRequestFhirResources",
20
+ "CreateSummaryRequestMode",
21
+ "CreateSummaryResponse",
22
+ "CreateSummaryTemplateResponse",
23
+ "FhirBundle",
24
+ "FhirBundleEntryItem",
25
+ "FhirResource",
26
+ "SummaryDeleteTemplateResponse",
27
+ "SummaryGetTemplateResponse",
28
+ "SummaryListTemplatesResponse",
29
+ "SummaryTemplate",
30
+ "SummaryUpdateTemplateResponse",
31
+ ]
@@ -0,0 +1,8 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from .fhir_bundle import FhirBundle
6
+ from .fhir_resource import FhirResource
7
+
8
+ CreateSummaryRequestFhirResources = typing.Union[FhirResource, FhirBundle]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ CreateSummaryRequestMode = typing.Union[typing.Literal["narrative", "flatten"], typing.Any]
@@ -0,0 +1,29 @@
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 CreateSummaryResponse(UniversalBaseModel):
10
+ success: typing.Optional[bool] = None
11
+ message: typing.Optional[str] = None
12
+ summary: typing.Optional[str] = pydantic.Field(default=None)
13
+ """
14
+ Generated summary text
15
+ """
16
+
17
+ warnings: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
18
+ """
19
+ Unresolved placeholders or issues (narrative mode only)
20
+ """
21
+
22
+ if IS_PYDANTIC_V2:
23
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
24
+ else:
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ 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 .summary_template import SummaryTemplate
8
+
9
+
10
+ class CreateSummaryTemplateResponse(UniversalBaseModel):
11
+ success: typing.Optional[bool] = None
12
+ message: typing.Optional[str] = None
13
+ template_id: typing.Optional[str] = None
14
+ template: typing.Optional[SummaryTemplate] = None
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,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ...core.serialization import FieldMetadata
9
+ from .fhir_bundle_entry_item import FhirBundleEntryItem
10
+
11
+
12
+ class FhirBundle(UniversalBaseModel):
13
+ resource_type: typing_extensions.Annotated[typing.Literal["Bundle"], FieldMetadata(alias="resourceType")] = "Bundle"
14
+ entry: typing.List[FhirBundleEntryItem]
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,20 @@
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 .fhir_resource import FhirResource
8
+
9
+
10
+ class FhirBundleEntryItem(UniversalBaseModel):
11
+ resource: typing.Optional[FhirResource] = None
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
15
+ else:
16
+
17
+ class Config:
18
+ frozen = True
19
+ smart_union = True
20
+ extra = pydantic.Extra.allow
@@ -0,0 +1,24 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ...core.serialization import FieldMetadata
9
+
10
+
11
+ class FhirResource(UniversalBaseModel):
12
+ resource_type: typing_extensions.Annotated[str, FieldMetadata(alias="resourceType")] = pydantic.Field()
13
+ """
14
+ FHIR resource type
15
+ """
16
+
17
+ if IS_PYDANTIC_V2:
18
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
19
+ else:
20
+
21
+ class Config:
22
+ frozen = True
23
+ smart_union = True
24
+ extra = pydantic.Extra.allow
@@ -0,0 +1,20 @@
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 SummaryDeleteTemplateResponse(UniversalBaseModel):
10
+ success: typing.Optional[bool] = None
11
+ message: typing.Optional[str] = None
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
15
+ else:
16
+
17
+ class Config:
18
+ frozen = True
19
+ smart_union = True
20
+ extra = pydantic.Extra.allow
@@ -0,0 +1,21 @@
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 .summary_template import SummaryTemplate
8
+
9
+
10
+ class SummaryGetTemplateResponse(UniversalBaseModel):
11
+ success: typing.Optional[bool] = None
12
+ template: typing.Optional[SummaryTemplate] = None
13
+
14
+ if IS_PYDANTIC_V2:
15
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
16
+ else:
17
+
18
+ class Config:
19
+ frozen = True
20
+ smart_union = True
21
+ extra = pydantic.Extra.allow
@@ -0,0 +1,21 @@
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 .summary_template import SummaryTemplate
8
+
9
+
10
+ class SummaryListTemplatesResponse(UniversalBaseModel):
11
+ success: typing.Optional[bool] = None
12
+ templates: typing.Optional[typing.List[SummaryTemplate]] = None
13
+
14
+ if IS_PYDANTIC_V2:
15
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
16
+ else:
17
+
18
+ class Config:
19
+ frozen = True
20
+ smart_union = True
21
+ extra = pydantic.Extra.allow
@@ -0,0 +1,41 @@
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
+
9
+
10
+ class SummaryTemplate(UniversalBaseModel):
11
+ id: typing.Optional[str] = None
12
+ user_id: typing.Optional[str] = None
13
+ name: typing.Optional[str] = None
14
+ description: typing.Optional[str] = None
15
+ template: typing.Optional[str] = pydantic.Field(default=None)
16
+ """
17
+ Template with {{resource.field}} placeholders
18
+ """
19
+
20
+ target_resources: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
21
+ """
22
+ List of FHIR resource types/profiles
23
+ """
24
+
25
+ mode: typing.Optional[str] = pydantic.Field(default=None)
26
+ """
27
+ Template mode (stored value)
28
+ """
29
+
30
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
31
+ created_at: typing.Optional[dt.datetime] = None
32
+ updated_at: typing.Optional[dt.datetime] = None
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
@@ -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
+ from .summary_template import SummaryTemplate
8
+
9
+
10
+ class SummaryUpdateTemplateResponse(UniversalBaseModel):
11
+ success: typing.Optional[bool] = None
12
+ message: typing.Optional[str] = None
13
+ template: typing.Optional[SummaryTemplate] = None
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
@@ -3,6 +3,7 @@
3
3
  # isort: skip_file
4
4
 
5
5
  from .types import (
6
+ CreateWorkflowRequestFhirProviderId,
6
7
  CreateWorkflowResponse,
7
8
  DecisionNodeDefinition,
8
9
  ExecuteWorkflowResponse,
@@ -12,6 +13,7 @@ from .types import (
12
13
  ListWorkflowsResponse,
13
14
  StepOperation,
14
15
  SubWorkflowDefinition,
16
+ UpdateWorkflowRequestFhirProviderId,
15
17
  WorkflowConfig,
16
18
  WorkflowDefinition,
17
19
  WorkflowGraph,
@@ -21,16 +23,11 @@ from .types import (
21
23
  WorkflowStepSummary,
22
24
  WorkflowStepSummaryType,
23
25
  WorkflowStepType,
24
- )
25
- from .errors import BadRequestError, ForbiddenError, InternalServerError, NotFoundError, UnauthorizedError
26
- from . import mcp_server, workflows
27
- from .workflows import (
28
- CreateWorkflowRequestFhirProviderId,
29
- UpdateWorkflowRequestFhirProviderId,
30
26
  WorkflowsDeleteResponse,
31
27
  WorkflowsGetResponse,
32
28
  WorkflowsUpdateResponse,
33
29
  )
30
+ from .errors import BadRequestError, ForbiddenError, InternalServerError, NotFoundError, UnauthorizedError
34
31
 
35
32
  __all__ = [
36
33
  "BadRequestError",
@@ -61,6 +58,4 @@ __all__ = [
61
58
  "WorkflowsDeleteResponse",
62
59
  "WorkflowsGetResponse",
63
60
  "WorkflowsUpdateResponse",
64
- "mcp_server",
65
- "workflows",
66
61
  ]