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.
Files changed (149) hide show
  1. phenoml/agent/__init__.py +6 -8
  2. phenoml/agent/client.py +85 -67
  3. phenoml/agent/raw_client.py +61 -77
  4. phenoml/agent/types/__init__.py +6 -8
  5. phenoml/agent/types/agent_create_request.py +53 -0
  6. phenoml/agent/types/agent_create_request_provider.py +5 -0
  7. phenoml/agent/types/agent_template.py +3 -6
  8. phenoml/agent/types/agent_template_provider.py +5 -0
  9. phenoml/agent/types/json_patch_operation.py +5 -1
  10. phenoml/client.py +12 -0
  11. phenoml/construe/__init__.py +2 -16
  12. phenoml/construe/client.py +0 -90
  13. phenoml/construe/raw_client.py +0 -180
  14. phenoml/construe/types/__init__.py +2 -20
  15. phenoml/construe/types/extract_request_config.py +33 -4
  16. phenoml/construe/types/extract_request_config_chunking_method.py +3 -1
  17. phenoml/construe/types/extract_request_config_validation_method.py +5 -0
  18. phenoml/construe/types/extract_request_system.py +2 -0
  19. phenoml/core/client_wrapper.py +2 -2
  20. phenoml/fhir/__init__.py +36 -0
  21. phenoml/fhir/client.py +1072 -0
  22. phenoml/fhir/errors/__init__.py +10 -0
  23. phenoml/fhir/errors/bad_request_error.py +10 -0
  24. phenoml/fhir/errors/internal_server_error.py +10 -0
  25. phenoml/fhir/errors/not_found_error.py +10 -0
  26. phenoml/fhir/errors/unauthorized_error.py +10 -0
  27. phenoml/fhir/raw_client.py +1469 -0
  28. phenoml/fhir/types/__init__.py +29 -0
  29. phenoml/{agent/types/chat_fhir_client_config.py → fhir/types/error_response.py} +11 -6
  30. phenoml/fhir/types/fhir_bundle.py +43 -0
  31. phenoml/fhir/types/fhir_bundle_entry_item.py +34 -0
  32. phenoml/fhir/types/fhir_bundle_entry_item_request.py +25 -0
  33. phenoml/fhir/types/fhir_bundle_entry_item_request_method.py +5 -0
  34. phenoml/{construe/types/bad_request_error_body.py → fhir/types/fhir_bundle_entry_item_response.py} +4 -7
  35. phenoml/fhir/types/fhir_patch_request_body_item.py +40 -0
  36. phenoml/fhir/types/fhir_patch_request_body_item_op.py +7 -0
  37. phenoml/fhir/types/fhir_resource.py +40 -0
  38. phenoml/fhir/types/fhir_resource_meta.py +28 -0
  39. phenoml/fhir/types/fhir_search_response.py +8 -0
  40. phenoml/fhir_provider/__init__.py +45 -0
  41. phenoml/fhir_provider/client.py +748 -0
  42. phenoml/fhir_provider/errors/__init__.py +11 -0
  43. phenoml/fhir_provider/errors/bad_request_error.py +10 -0
  44. phenoml/fhir_provider/errors/forbidden_error.py +10 -0
  45. phenoml/fhir_provider/errors/internal_server_error.py +10 -0
  46. phenoml/fhir_provider/errors/not_found_error.py +10 -0
  47. phenoml/fhir_provider/errors/unauthorized_error.py +10 -0
  48. phenoml/fhir_provider/raw_client.py +1462 -0
  49. phenoml/fhir_provider/types/__init__.py +37 -0
  50. phenoml/fhir_provider/types/auth_method.py +7 -0
  51. phenoml/fhir_provider/types/fhir_provider_auth_config.py +53 -0
  52. phenoml/fhir_provider/types/fhir_provider_delete_response.py +20 -0
  53. phenoml/fhir_provider/types/fhir_provider_list_response.py +22 -0
  54. phenoml/fhir_provider/types/fhir_provider_remove_auth_config_response.py +22 -0
  55. phenoml/fhir_provider/types/fhir_provider_response.py +22 -0
  56. phenoml/fhir_provider/types/fhir_provider_set_active_auth_config_response.py +22 -0
  57. phenoml/fhir_provider/types/fhir_provider_template.py +66 -0
  58. phenoml/fhir_provider/types/fhir_query_response.py +27 -0
  59. phenoml/fhir_provider/types/fhir_query_response_data.py +5 -0
  60. phenoml/fhir_provider/types/json_web_key.py +51 -0
  61. phenoml/fhir_provider/types/provider.py +8 -0
  62. phenoml/fhir_provider/types/role.py +27 -0
  63. phenoml/fhir_provider/types/service_account_key.py +35 -0
  64. phenoml/fhir_provider/types/smart_configuration.py +46 -0
  65. phenoml/lang2fhir/__init__.py +10 -0
  66. phenoml/lang2fhir/client.py +111 -6
  67. phenoml/lang2fhir/raw_client.py +189 -0
  68. phenoml/lang2fhir/types/__init__.py +10 -0
  69. phenoml/lang2fhir/types/create_multi_response.py +39 -0
  70. phenoml/lang2fhir/types/create_multi_response_bundle.py +28 -0
  71. phenoml/lang2fhir/types/create_multi_response_bundle_entry_item.py +24 -0
  72. phenoml/lang2fhir/types/create_multi_response_bundle_entry_item_request.py +20 -0
  73. 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
  74. phenoml/summary/__init__.py +41 -0
  75. phenoml/summary/client.py +668 -0
  76. phenoml/summary/errors/__init__.py +11 -0
  77. phenoml/summary/errors/bad_request_error.py +10 -0
  78. phenoml/summary/errors/forbidden_error.py +10 -0
  79. phenoml/summary/errors/internal_server_error.py +10 -0
  80. phenoml/summary/errors/not_found_error.py +10 -0
  81. phenoml/summary/errors/unauthorized_error.py +10 -0
  82. phenoml/summary/raw_client.py +1202 -0
  83. phenoml/summary/types/__init__.py +33 -0
  84. phenoml/summary/types/create_summary_request_fhir_resources.py +8 -0
  85. phenoml/summary/types/create_summary_request_mode.py +5 -0
  86. phenoml/{agent/types/agent_fhir_config.py → summary/types/create_summary_response.py} +7 -9
  87. phenoml/summary/types/create_summary_template_response.py +23 -0
  88. phenoml/{construe/types/unauthorized_error_body.py → summary/types/error_response.py} +4 -8
  89. phenoml/summary/types/fhir_bundle.py +23 -0
  90. phenoml/summary/types/fhir_bundle_entry_item.py +20 -0
  91. phenoml/summary/types/fhir_resource.py +24 -0
  92. phenoml/summary/types/summary_delete_template_response.py +20 -0
  93. phenoml/summary/types/summary_get_template_response.py +21 -0
  94. phenoml/summary/types/summary_list_templates_response.py +21 -0
  95. phenoml/summary/types/summary_template.py +41 -0
  96. phenoml/summary/types/summary_update_template_response.py +22 -0
  97. phenoml/tools/__init__.py +6 -8
  98. phenoml/tools/client.py +259 -44
  99. phenoml/tools/raw_client.py +347 -55
  100. phenoml/tools/types/__init__.py +6 -8
  101. phenoml/tools/types/lang2fhir_and_create_multi_response.py +41 -0
  102. 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
  103. phenoml/tools/types/lang2fhir_and_create_multi_response_response_bundle.py +27 -0
  104. phenoml/workflows/__init__.py +61 -0
  105. phenoml/workflows/client.py +694 -0
  106. phenoml/workflows/errors/__init__.py +11 -0
  107. phenoml/workflows/errors/bad_request_error.py +10 -0
  108. phenoml/workflows/errors/forbidden_error.py +10 -0
  109. phenoml/workflows/errors/internal_server_error.py +10 -0
  110. phenoml/workflows/errors/not_found_error.py +10 -0
  111. phenoml/workflows/errors/unauthorized_error.py +10 -0
  112. phenoml/workflows/raw_client.py +1266 -0
  113. phenoml/workflows/types/__init__.py +53 -0
  114. phenoml/workflows/types/create_workflow_request_fhir_provider_id.py +5 -0
  115. phenoml/workflows/types/create_workflow_response.py +44 -0
  116. phenoml/{tools/types/fhir_client_config.py → workflows/types/decision_node_definition.py} +7 -6
  117. phenoml/workflows/types/execute_workflow_response.py +30 -0
  118. phenoml/{construe/types/internal_server_error_body.py → workflows/types/execute_workflow_response_results.py} +3 -8
  119. phenoml/workflows/types/lang2fhir_create_definition.py +37 -0
  120. phenoml/workflows/types/lang2fhir_search_definition.py +42 -0
  121. phenoml/workflows/types/list_workflows_response.py +39 -0
  122. phenoml/workflows/types/step_operation.py +26 -0
  123. phenoml/workflows/types/sub_workflow_definition.py +32 -0
  124. phenoml/workflows/types/update_workflow_request_fhir_provider_id.py +5 -0
  125. phenoml/workflows/types/workflow_config.py +27 -0
  126. phenoml/workflows/types/workflow_definition.py +57 -0
  127. phenoml/workflows/types/workflow_graph.py +23 -0
  128. phenoml/workflows/types/workflow_response.py +61 -0
  129. phenoml/workflows/types/workflow_response_graph.py +23 -0
  130. phenoml/workflows/types/workflow_step.py +55 -0
  131. phenoml/workflows/types/workflow_step_summary.py +47 -0
  132. phenoml/workflows/types/workflow_step_summary_type.py +5 -0
  133. phenoml/workflows/types/workflow_step_type.py +5 -0
  134. phenoml/workflows/types/workflows_delete_response.py +20 -0
  135. phenoml/workflows/types/workflows_get_response.py +26 -0
  136. phenoml/workflows/types/workflows_update_response.py +31 -0
  137. phenoml-0.0.17.dist-info/LICENSE +21 -0
  138. {phenoml-0.0.2.dist-info → phenoml-0.0.17.dist-info}/METADATA +1 -1
  139. phenoml-0.0.17.dist-info/RECORD +251 -0
  140. phenoml/agent/types/agent_provider.py +0 -7
  141. phenoml/agent/types/provider_type.py +0 -5
  142. phenoml/construe/types/construe_cohort_request_config.py +0 -37
  143. phenoml/construe/types/construe_cohort_response.py +0 -33
  144. phenoml/construe/types/construe_cohort_response_queries_item.py +0 -49
  145. phenoml/tools/types/cohort_request_provider.py +0 -5
  146. phenoml/tools/types/lang2fhir_and_create_request_provider.py +0 -7
  147. phenoml/tools/types/lang2fhir_and_search_request_provider.py +0 -7
  148. phenoml-0.0.2.dist-info/RECORD +0 -153
  149. {phenoml-0.0.2.dist-info → phenoml-0.0.17.dist-info}/WHEEL +0 -0
@@ -13,6 +13,7 @@ from .errors.failed_dependency_error import FailedDependencyError
13
13
  from .errors.forbidden_error import ForbiddenError
14
14
  from .errors.internal_server_error import InternalServerError
15
15
  from .errors.unauthorized_error import UnauthorizedError
16
+ from .types.create_multi_response import CreateMultiResponse
16
17
  from .types.create_request_resource import CreateRequestResource
17
18
  from .types.document_request_file_type import DocumentRequestFileType
18
19
  from .types.document_request_resource import DocumentRequestResource
@@ -120,6 +121,100 @@ class RawLang2FhirClient:
120
121
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
121
122
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
122
123
 
124
+ def create_multi(
125
+ self,
126
+ *,
127
+ text: str,
128
+ version: typing.Optional[str] = OMIT,
129
+ provider: typing.Optional[str] = OMIT,
130
+ request_options: typing.Optional[RequestOptions] = None,
131
+ ) -> HttpResponse[CreateMultiResponse]:
132
+ """
133
+ Analyzes natural language text and extracts multiple FHIR resources, returning them as a transaction Bundle.
134
+ Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types from the text.
135
+ Resources are linked with proper references (e.g., Conditions reference the Patient).
136
+
137
+ Parameters
138
+ ----------
139
+ text : str
140
+ Natural language text containing multiple clinical concepts to extract
141
+
142
+ version : typing.Optional[str]
143
+ FHIR version to use
144
+
145
+ provider : typing.Optional[str]
146
+ Optional FHIR provider name for provider-specific profiles
147
+
148
+ request_options : typing.Optional[RequestOptions]
149
+ Request-specific configuration.
150
+
151
+ Returns
152
+ -------
153
+ HttpResponse[CreateMultiResponse]
154
+ Successfully extracted FHIR resources
155
+ """
156
+ _response = self._client_wrapper.httpx_client.request(
157
+ "lang2fhir/create/multi",
158
+ method="POST",
159
+ json={
160
+ "text": text,
161
+ "version": version,
162
+ "provider": provider,
163
+ },
164
+ headers={
165
+ "content-type": "application/json",
166
+ },
167
+ request_options=request_options,
168
+ omit=OMIT,
169
+ )
170
+ try:
171
+ if 200 <= _response.status_code < 300:
172
+ _data = typing.cast(
173
+ CreateMultiResponse,
174
+ parse_obj_as(
175
+ type_=CreateMultiResponse, # type: ignore
176
+ object_=_response.json(),
177
+ ),
178
+ )
179
+ return HttpResponse(response=_response, data=_data)
180
+ if _response.status_code == 400:
181
+ raise BadRequestError(
182
+ headers=dict(_response.headers),
183
+ body=typing.cast(
184
+ typing.Optional[typing.Any],
185
+ parse_obj_as(
186
+ type_=typing.Optional[typing.Any], # type: ignore
187
+ object_=_response.json(),
188
+ ),
189
+ ),
190
+ )
191
+ if _response.status_code == 401:
192
+ raise UnauthorizedError(
193
+ headers=dict(_response.headers),
194
+ body=typing.cast(
195
+ typing.Optional[typing.Any],
196
+ parse_obj_as(
197
+ type_=typing.Optional[typing.Any], # type: ignore
198
+ object_=_response.json(),
199
+ ),
200
+ ),
201
+ )
202
+ if _response.status_code == 500:
203
+ raise InternalServerError(
204
+ headers=dict(_response.headers),
205
+ body=typing.cast(
206
+ typing.Optional[typing.Any],
207
+ parse_obj_as(
208
+ type_=typing.Optional[typing.Any], # type: ignore
209
+ object_=_response.json(),
210
+ ),
211
+ ),
212
+ )
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
+
123
218
  def search(
124
219
  self, *, text: str, request_options: typing.Optional[RequestOptions] = None
125
220
  ) -> HttpResponse[SearchResponse]:
@@ -502,6 +597,100 @@ class AsyncRawLang2FhirClient:
502
597
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
503
598
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
504
599
 
600
+ async def create_multi(
601
+ self,
602
+ *,
603
+ text: str,
604
+ version: typing.Optional[str] = OMIT,
605
+ provider: typing.Optional[str] = OMIT,
606
+ request_options: typing.Optional[RequestOptions] = None,
607
+ ) -> AsyncHttpResponse[CreateMultiResponse]:
608
+ """
609
+ Analyzes natural language text and extracts multiple FHIR resources, returning them as a transaction Bundle.
610
+ Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types from the text.
611
+ Resources are linked with proper references (e.g., Conditions reference the Patient).
612
+
613
+ Parameters
614
+ ----------
615
+ text : str
616
+ Natural language text containing multiple clinical concepts to extract
617
+
618
+ version : typing.Optional[str]
619
+ FHIR version to use
620
+
621
+ provider : typing.Optional[str]
622
+ Optional FHIR provider name for provider-specific profiles
623
+
624
+ request_options : typing.Optional[RequestOptions]
625
+ Request-specific configuration.
626
+
627
+ Returns
628
+ -------
629
+ AsyncHttpResponse[CreateMultiResponse]
630
+ Successfully extracted FHIR resources
631
+ """
632
+ _response = await self._client_wrapper.httpx_client.request(
633
+ "lang2fhir/create/multi",
634
+ method="POST",
635
+ json={
636
+ "text": text,
637
+ "version": version,
638
+ "provider": provider,
639
+ },
640
+ headers={
641
+ "content-type": "application/json",
642
+ },
643
+ request_options=request_options,
644
+ omit=OMIT,
645
+ )
646
+ try:
647
+ if 200 <= _response.status_code < 300:
648
+ _data = typing.cast(
649
+ CreateMultiResponse,
650
+ parse_obj_as(
651
+ type_=CreateMultiResponse, # type: ignore
652
+ object_=_response.json(),
653
+ ),
654
+ )
655
+ return AsyncHttpResponse(response=_response, data=_data)
656
+ if _response.status_code == 400:
657
+ raise BadRequestError(
658
+ headers=dict(_response.headers),
659
+ body=typing.cast(
660
+ typing.Optional[typing.Any],
661
+ parse_obj_as(
662
+ type_=typing.Optional[typing.Any], # type: ignore
663
+ object_=_response.json(),
664
+ ),
665
+ ),
666
+ )
667
+ if _response.status_code == 401:
668
+ raise UnauthorizedError(
669
+ headers=dict(_response.headers),
670
+ body=typing.cast(
671
+ typing.Optional[typing.Any],
672
+ parse_obj_as(
673
+ type_=typing.Optional[typing.Any], # type: ignore
674
+ object_=_response.json(),
675
+ ),
676
+ ),
677
+ )
678
+ if _response.status_code == 500:
679
+ raise InternalServerError(
680
+ headers=dict(_response.headers),
681
+ body=typing.cast(
682
+ typing.Optional[typing.Any],
683
+ parse_obj_as(
684
+ type_=typing.Optional[typing.Any], # type: ignore
685
+ object_=_response.json(),
686
+ ),
687
+ ),
688
+ )
689
+ _response_json = _response.json()
690
+ except JSONDecodeError:
691
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
692
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
693
+
505
694
  async def search(
506
695
  self, *, text: str, request_options: typing.Optional[RequestOptions] = None
507
696
  ) -> AsyncHttpResponse[SearchResponse]:
@@ -2,6 +2,11 @@
2
2
 
3
3
  # isort: skip_file
4
4
 
5
+ from .create_multi_response import CreateMultiResponse
6
+ from .create_multi_response_bundle import CreateMultiResponseBundle
7
+ from .create_multi_response_bundle_entry_item import CreateMultiResponseBundleEntryItem
8
+ from .create_multi_response_bundle_entry_item_request import CreateMultiResponseBundleEntryItemRequest
9
+ from .create_multi_response_resources_item import CreateMultiResponseResourcesItem
5
10
  from .create_request_resource import CreateRequestResource
6
11
  from .document_request_file_type import DocumentRequestFileType
7
12
  from .document_request_resource import DocumentRequestResource
@@ -10,6 +15,11 @@ from .lang2fhir_upload_profile_response import Lang2FhirUploadProfileResponse
10
15
  from .search_response import SearchResponse
11
16
 
12
17
  __all__ = [
18
+ "CreateMultiResponse",
19
+ "CreateMultiResponseBundle",
20
+ "CreateMultiResponseBundleEntryItem",
21
+ "CreateMultiResponseBundleEntryItemRequest",
22
+ "CreateMultiResponseResourcesItem",
13
23
  "CreateRequestResource",
14
24
  "DocumentRequestFileType",
15
25
  "DocumentRequestResource",
@@ -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 .create_multi_response_bundle import CreateMultiResponseBundle
8
+ from .create_multi_response_resources_item import CreateMultiResponseResourcesItem
9
+
10
+
11
+ class CreateMultiResponse(UniversalBaseModel):
12
+ success: typing.Optional[bool] = pydantic.Field(default=None)
13
+ """
14
+ Whether extraction was successful
15
+ """
16
+
17
+ message: typing.Optional[str] = pydantic.Field(default=None)
18
+ """
19
+ Status message
20
+ """
21
+
22
+ bundle: typing.Optional[CreateMultiResponseBundle] = pydantic.Field(default=None)
23
+ """
24
+ FHIR transaction Bundle containing all extracted resources
25
+ """
26
+
27
+ resources: typing.Optional[typing.List[CreateMultiResponseResourcesItem]] = pydantic.Field(default=None)
28
+ """
29
+ Summary of extracted resources
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,28 @@
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 .create_multi_response_bundle_entry_item import CreateMultiResponseBundleEntryItem
10
+
11
+
12
+ class CreateMultiResponseBundle(UniversalBaseModel):
13
+ """
14
+ FHIR transaction Bundle containing all extracted resources
15
+ """
16
+
17
+ resource_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="resourceType")] = None
18
+ type: typing.Optional[str] = None
19
+ entry: typing.Optional[typing.List[CreateMultiResponseBundleEntryItem]] = None
20
+
21
+ if IS_PYDANTIC_V2:
22
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
23
+ else:
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ 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
+ from .create_multi_response_bundle_entry_item_request import CreateMultiResponseBundleEntryItemRequest
10
+
11
+
12
+ class CreateMultiResponseBundleEntryItem(UniversalBaseModel):
13
+ full_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fullUrl")] = None
14
+ resource: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
15
+ request: typing.Optional[CreateMultiResponseBundleEntryItemRequest] = None
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 CreateMultiResponseBundleEntryItemRequest(UniversalBaseModel):
10
+ method: typing.Optional[str] = None
11
+ url: 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
@@ -3,23 +3,29 @@
3
3
  import typing
4
4
 
5
5
  import pydantic
6
+ import typing_extensions
6
7
  from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ...core.serialization import FieldMetadata
7
9
 
8
10
 
9
- class ConstrueCohortResponseQueriesItemCodeExtractResultsItemCodesItem(UniversalBaseModel):
10
- code: typing.Optional[str] = pydantic.Field(default=None)
11
+ class CreateMultiResponseResourcesItem(UniversalBaseModel):
12
+ temp_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="tempId")] = pydantic.Field(
13
+ default=None
14
+ )
11
15
  """
12
- Medical code.
16
+ Temporary UUID for the resource
13
17
  """
14
18
 
15
- description: typing.Optional[str] = pydantic.Field(default=None)
19
+ resource_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="resourceType")] = (
20
+ pydantic.Field(default=None)
21
+ )
16
22
  """
17
- Description of the medical code.
23
+ FHIR resource type
18
24
  """
19
25
 
20
- reason: typing.Optional[str] = pydantic.Field(default=None)
26
+ description: typing.Optional[str] = pydantic.Field(default=None)
21
27
  """
22
- Reason for selecting the code.
28
+ Text excerpt this resource was extracted from
23
29
  """
24
30
 
25
31
  if IS_PYDANTIC_V2:
@@ -0,0 +1,41 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ from .types import (
6
+ CreateSummaryRequestFhirResources,
7
+ CreateSummaryRequestMode,
8
+ CreateSummaryResponse,
9
+ CreateSummaryTemplateResponse,
10
+ ErrorResponse,
11
+ FhirBundle,
12
+ FhirBundleEntryItem,
13
+ FhirResource,
14
+ SummaryDeleteTemplateResponse,
15
+ SummaryGetTemplateResponse,
16
+ SummaryListTemplatesResponse,
17
+ SummaryTemplate,
18
+ SummaryUpdateTemplateResponse,
19
+ )
20
+ from .errors import BadRequestError, ForbiddenError, InternalServerError, NotFoundError, UnauthorizedError
21
+
22
+ __all__ = [
23
+ "BadRequestError",
24
+ "CreateSummaryRequestFhirResources",
25
+ "CreateSummaryRequestMode",
26
+ "CreateSummaryResponse",
27
+ "CreateSummaryTemplateResponse",
28
+ "ErrorResponse",
29
+ "FhirBundle",
30
+ "FhirBundleEntryItem",
31
+ "FhirResource",
32
+ "ForbiddenError",
33
+ "InternalServerError",
34
+ "NotFoundError",
35
+ "SummaryDeleteTemplateResponse",
36
+ "SummaryGetTemplateResponse",
37
+ "SummaryListTemplatesResponse",
38
+ "SummaryTemplate",
39
+ "SummaryUpdateTemplateResponse",
40
+ "UnauthorizedError",
41
+ ]