phenoml 0.0.8__py3-none-any.whl → 0.0.9__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 (34) hide show
  1. phenoml/agent/client.py +38 -2
  2. phenoml/agent/raw_client.py +24 -0
  3. phenoml/client.py +4 -4
  4. phenoml/construe/__init__.py +2 -16
  5. phenoml/construe/client.py +0 -90
  6. phenoml/construe/raw_client.py +0 -180
  7. phenoml/construe/types/__init__.py +2 -20
  8. phenoml/construe/types/extract_request_config.py +33 -4
  9. phenoml/construe/types/extract_request_config_chunking_method.py +3 -1
  10. phenoml/construe/types/extract_request_config_validation_method.py +5 -0
  11. phenoml/construe/types/extract_request_system.py +2 -0
  12. phenoml/core/client_wrapper.py +8 -10
  13. phenoml/fhir/client.py +116 -14
  14. phenoml/fhir/raw_client.py +84 -0
  15. phenoml/fhir_provider/__init__.py +2 -0
  16. phenoml/fhir_provider/client.py +21 -4
  17. phenoml/fhir_provider/raw_client.py +23 -6
  18. phenoml/fhir_provider/types/__init__.py +2 -0
  19. phenoml/fhir_provider/types/auth_method.py +1 -1
  20. phenoml/fhir_provider/types/role.py +27 -0
  21. phenoml/tools/client.py +112 -6
  22. phenoml/tools/raw_client.py +82 -2
  23. {phenoml-0.0.8.dist-info → phenoml-0.0.9.dist-info}/METADATA +1 -1
  24. {phenoml-0.0.8.dist-info → phenoml-0.0.9.dist-info}/RECORD +26 -32
  25. phenoml/construe/types/bad_request_error_body.py +0 -27
  26. phenoml/construe/types/construe_cohort_request_config.py +0 -37
  27. phenoml/construe/types/construe_cohort_response.py +0 -33
  28. phenoml/construe/types/construe_cohort_response_queries_item.py +0 -49
  29. phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item.py +0 -31
  30. phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item_codes_item.py +0 -32
  31. phenoml/construe/types/internal_server_error_body.py +0 -27
  32. phenoml/construe/types/unauthorized_error_body.py +0 -27
  33. {phenoml-0.0.8.dist-info → phenoml-0.0.9.dist-info}/LICENSE +0 -0
  34. {phenoml-0.0.8.dist-info → phenoml-0.0.9.dist-info}/WHEEL +0 -0
@@ -1,37 +0,0 @@
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 ConstrueCohortRequestConfig(UniversalBaseModel):
10
- include_extract_results: typing.Optional[bool] = pydantic.Field(default=None)
11
- """
12
- When enabled, includes detailed information about medical codes extracted from the text.
13
- """
14
-
15
- include_rationale: typing.Optional[bool] = pydantic.Field(default=None)
16
- """
17
- When enabled, includes AI-generated explanations for each query component and code extraction.
18
- """
19
-
20
- exclude_deceased: typing.Optional[bool] = pydantic.Field(default=None)
21
- """
22
- Controls whether deceased patients should be excluded from the cohort.
23
- """
24
-
25
- sql_syntax: typing.Optional[typing.Literal["bigquery"]] = pydantic.Field(default=None)
26
- """
27
- Specifies the SQL dialect for query generation. Currently, only "bigquery" is supported.
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
@@ -1,33 +0,0 @@
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 .construe_cohort_response_queries_item import ConstrueCohortResponseQueriesItem
10
-
11
-
12
- class ConstrueCohortResponse(UniversalBaseModel):
13
- queries: typing.Optional[typing.List[ConstrueCohortResponseQueriesItem]] = None
14
- sql: typing.Optional[str] = pydantic.Field(default=None)
15
- """
16
- Generated SQL query when `sql_syntax` is specified. Variables in curly braces need to be replaced with your actual table names.
17
- """
18
-
19
- cohort_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cohortDescription")] = (
20
- pydantic.Field(default=None)
21
- )
22
- """
23
- Echo of the input text description for reference.
24
- """
25
-
26
- if IS_PYDANTIC_V2:
27
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
- else:
29
-
30
- class Config:
31
- frozen = True
32
- smart_union = True
33
- extra = pydantic.Extra.allow
@@ -1,49 +0,0 @@
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 .construe_cohort_response_queries_item_code_extract_results_item import (
10
- ConstrueCohortResponseQueriesItemCodeExtractResultsItem,
11
- )
12
-
13
-
14
- class ConstrueCohortResponseQueriesItem(UniversalBaseModel):
15
- resource: typing.Optional[str] = pydantic.Field(default=None)
16
- """
17
- FHIR resource type (e.g., "Patient", "Condition").
18
- """
19
-
20
- search_params: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="searchParams")] = (
21
- pydantic.Field(default=None)
22
- )
23
- """
24
- FHIR search parameters.
25
- """
26
-
27
- exclude: typing.Optional[bool] = pydantic.Field(default=None)
28
- """
29
- Indicates if this is an exclusion criteria.
30
- """
31
-
32
- rationale: typing.Optional[str] = pydantic.Field(default=None)
33
- """
34
- AI-generated explanation for the query component.
35
- """
36
-
37
- code_extract_results: typing_extensions.Annotated[
38
- typing.Optional[typing.List[ConstrueCohortResponseQueriesItemCodeExtractResultsItem]],
39
- FieldMetadata(alias="codeExtractResults"),
40
- ] = None
41
-
42
- if IS_PYDANTIC_V2:
43
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
44
- else:
45
-
46
- class Config:
47
- frozen = True
48
- smart_union = True
49
- extra = pydantic.Extra.allow
@@ -1,31 +0,0 @@
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 .construe_cohort_response_queries_item_code_extract_results_item_codes_item import (
10
- ConstrueCohortResponseQueriesItemCodeExtractResultsItemCodesItem,
11
- )
12
-
13
-
14
- class ConstrueCohortResponseQueriesItemCodeExtractResultsItem(UniversalBaseModel):
15
- system_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="systemName")] = pydantic.Field(
16
- default=None
17
- )
18
- """
19
- Name of the coding system (e.g., "SNOMED_CT_US_LITE").
20
- """
21
-
22
- codes: typing.Optional[typing.List[ConstrueCohortResponseQueriesItemCodeExtractResultsItemCodesItem]] = None
23
-
24
- if IS_PYDANTIC_V2:
25
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
26
- else:
27
-
28
- class Config:
29
- frozen = True
30
- smart_union = True
31
- extra = pydantic.Extra.allow
@@ -1,32 +0,0 @@
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 ConstrueCohortResponseQueriesItemCodeExtractResultsItemCodesItem(UniversalBaseModel):
10
- code: typing.Optional[str] = pydantic.Field(default=None)
11
- """
12
- Medical code.
13
- """
14
-
15
- description: typing.Optional[str] = pydantic.Field(default=None)
16
- """
17
- Description of the medical code.
18
- """
19
-
20
- reason: typing.Optional[str] = pydantic.Field(default=None)
21
- """
22
- Reason for selecting the code.
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
@@ -1,27 +0,0 @@
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 InternalServerErrorBody(UniversalBaseModel):
10
- status: typing.Optional[int] = pydantic.Field(default=None)
11
- """
12
- HTTP status code.
13
- """
14
-
15
- message: typing.Optional[str] = pydantic.Field(default=None)
16
- """
17
- Error message.
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
@@ -1,27 +0,0 @@
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 UnauthorizedErrorBody(UniversalBaseModel):
10
- status: typing.Optional[int] = pydantic.Field(default=None)
11
- """
12
- HTTP status code.
13
- """
14
-
15
- message: typing.Optional[str] = pydantic.Field(default=None)
16
- """
17
- Error message.
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