phenoml 2.0.0__tar.gz → 3.0.0__tar.gz
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-2.0.0 → phenoml-3.0.0}/PKG-INFO +1 -1
- {phenoml-2.0.0 → phenoml-3.0.0}/pyproject.toml +1 -1
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/__init__.py +2 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/client.py +36 -16
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/raw_client.py +32 -12
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/__init__.py +2 -0
- phenoml-3.0.0/src/phenoml/construe/types/citation.py +36 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/extract_request_config.py +9 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/extract_request_system.py +3 -1
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/extracted_code_result.py +14 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/client_wrapper.py +2 -2
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/__init__.py +2 -1
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/errors/__init__.py +2 -1
- phenoml-3.0.0/src/phenoml/fhir/errors/bad_gateway_error.py +11 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/raw_client.py +134 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/__init__.py +0 -2
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/client.py +8 -15
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/raw_client.py +6 -13
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/__init__.py +0 -2
- phenoml-2.0.0/src/phenoml/lang2fhir/types/document_request_file_type.py +0 -7
- {phenoml-2.0.0 → phenoml-3.0.0}/LICENSE +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/README.md +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/errors/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/errors/bad_request_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/errors/forbidden_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/errors/internal_server_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/errors/not_found_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/errors/unauthorized_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/prompts/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/prompts/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/prompts/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/prompts/types/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/prompts/types/prompts_delete_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/prompts/types/prompts_list_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_chat_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_create_request.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_create_request_provider.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_delete_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_get_chat_messages_request_order.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_get_chat_messages_request_role.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_get_chat_messages_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_list_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_prompts_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_template.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/agent_template_provider.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/chat_message_template.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/chat_message_template_role.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/chat_session_template.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/json_patch.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/json_patch_operation.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/json_patch_operation_op.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/prompt_template.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/agent/types/success_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/auth/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/auth/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/auth/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/auth/types/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/auth/types/auth_generate_token_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/errors/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/errors/bad_request_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/errors/unauthorized_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/types/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/types/bad_request_error_body.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/authtoken/types/unauthorized_error_body.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/cohort/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/cohort/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/cohort/errors/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/cohort/errors/bad_request_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/cohort/errors/internal_server_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/cohort/errors/unauthorized_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/cohort/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/cohort/types/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/cohort/types/cohort_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/cohort/types/search_concept.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/errors/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/errors/bad_request_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/errors/conflict_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/errors/failed_dependency_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/errors/internal_server_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/errors/not_found_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/errors/not_implemented_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/errors/service_unavailable_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/errors/unauthorized_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/code_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/code_system_details.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/code_system_info.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/construe_upload_code_system_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/extract_codes_result.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/extract_request_config_chunking_method.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/extract_request_config_validation_method.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/get_code_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/list_code_systems_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/list_codes_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/semantic_search_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/semantic_search_result.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/text_search_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/text_search_result.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/construe/types/upload_request_format.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/api_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/datetime_utils.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/file.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/force_multipart.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/http_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/http_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/jsonable_encoder.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/pydantic_utilities.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/query_encoder.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/remove_none_from_dict.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/request_options.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/core/serialization.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/environment.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/errors/bad_request_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/errors/internal_server_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/errors/not_found_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/errors/unauthorized_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/error_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/fhir_bundle.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/fhir_bundle_entry_item.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/fhir_bundle_entry_item_request.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/fhir_bundle_entry_item_request_method.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/fhir_bundle_entry_item_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/fhir_patch_request_body_item.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/fhir_patch_request_body_item_op.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/fhir_resource.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/fhir_resource_meta.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir/types/fhir_search_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/errors/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/errors/bad_request_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/errors/forbidden_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/errors/internal_server_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/errors/not_found_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/errors/unauthorized_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/auth_method.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_provider_auth_config.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_provider_delete_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_provider_list_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_provider_list_response_fhir_providers_item.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_provider_remove_auth_config_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_provider_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_provider_response_data.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_provider_sandbox_info.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_provider_template.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_query_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/fhir_query_response_data.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/json_web_key.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/provider.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/role.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/service_account_key.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/service_account_metadata.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/fhir_provider/types/smart_configuration.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/errors/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/errors/bad_request_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/errors/failed_dependency_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/errors/forbidden_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/errors/internal_server_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/errors/unauthorized_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/create_multi_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/create_multi_response_bundle.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/create_multi_response_bundle_entry_item.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/create_multi_response_bundle_entry_item_request.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/create_multi_response_resources_item.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/create_request_resource.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/document_request_resource.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/fhir_resource.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/lang2fhir_upload_profile_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/search_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/lang2fhir/types/search_response_resource_type.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/py.typed +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/errors/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/errors/bad_request_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/errors/forbidden_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/errors/internal_server_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/errors/not_found_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/errors/unauthorized_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/create_summary_request_fhir_resources.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/create_summary_request_mode.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/create_summary_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/create_summary_template_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/error_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/fhir_bundle.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/fhir_bundle_entry_item.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/fhir_resource.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/summary_delete_template_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/summary_get_template_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/summary_list_templates_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/summary_template.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/summary/types/summary_update_template_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/errors/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/errors/bad_request_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/errors/failed_dependency_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/errors/forbidden_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/errors/internal_server_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/errors/unauthorized_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/mcp_server/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/mcp_server/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/mcp_server/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/mcp_server/tools/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/mcp_server/tools/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/mcp_server/tools/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/cohort_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/lang2fhir_and_create_multi_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/lang2fhir_and_create_multi_response_resource_info_item.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/lang2fhir_and_create_multi_response_response_bundle.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/lang2fhir_and_create_request_resource.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/lang2fhir_and_create_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/lang2fhir_and_search_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/mcp_server_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/mcp_server_response_data.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/mcp_server_tool_call_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/mcp_server_tool_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/mcp_server_tool_response_data.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/tools/types/search_concept.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/version.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/errors/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/errors/bad_request_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/errors/forbidden_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/errors/internal_server_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/errors/not_found_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/errors/unauthorized_error.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/raw_client.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/__init__.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/create_workflow_request_fhir_provider_id.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/create_workflow_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/decision_node_definition.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/execute_workflow_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/execute_workflow_response_results.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/lang2fhir_create_definition.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/lang2fhir_search_definition.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/list_workflows_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/step_operation.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/sub_workflow_definition.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/update_workflow_request_fhir_provider_id.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflow_config.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflow_definition.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflow_graph.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflow_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflow_response_graph.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflow_step.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflow_step_summary.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflow_step_summary_type.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflow_step_type.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflows_delete_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflows_get_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/workflows/types/workflows_update_response.py +0 -0
- {phenoml-2.0.0 → phenoml-3.0.0}/src/phenoml/wrapper_client.py +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
5
|
from .types import (
|
|
6
|
+
Citation,
|
|
6
7
|
CodeResponse,
|
|
7
8
|
CodeSystemDetails,
|
|
8
9
|
CodeSystemInfo,
|
|
@@ -35,6 +36,7 @@ from .errors import (
|
|
|
35
36
|
|
|
36
37
|
__all__ = [
|
|
37
38
|
"BadRequestError",
|
|
39
|
+
"Citation",
|
|
38
40
|
"CodeResponse",
|
|
39
41
|
"CodeSystemDetails",
|
|
40
42
|
"CodeSystemInfo",
|
|
@@ -49,7 +49,7 @@ class ConstrueClient:
|
|
|
49
49
|
request_options: typing.Optional[RequestOptions] = None,
|
|
50
50
|
) -> ConstrueUploadCodeSystemResponse:
|
|
51
51
|
"""
|
|
52
|
-
Upload a custom medical code system with codes and descriptions for use in code extraction.
|
|
52
|
+
Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
|
|
53
53
|
Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
|
|
54
54
|
subsequently use the code system for construe/extract and lang2fhir/create (coming soon!)
|
|
55
55
|
|
|
@@ -123,7 +123,9 @@ class ConstrueClient:
|
|
|
123
123
|
request_options: typing.Optional[RequestOptions] = None,
|
|
124
124
|
) -> ExtractCodesResult:
|
|
125
125
|
"""
|
|
126
|
-
Converts natural language text into structured medical codes
|
|
126
|
+
Converts natural language text into structured medical codes.
|
|
127
|
+
|
|
128
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
127
129
|
|
|
128
130
|
Parameters
|
|
129
131
|
----------
|
|
@@ -162,7 +164,7 @@ class ConstrueClient:
|
|
|
162
164
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
163
165
|
) -> ListCodeSystemsResponse:
|
|
164
166
|
"""
|
|
165
|
-
Returns
|
|
167
|
+
Returns the terminology server's catalog of available code systems, including both built-in standard terminologies and custom uploaded systems.
|
|
166
168
|
|
|
167
169
|
Parameters
|
|
168
170
|
----------
|
|
@@ -196,7 +198,9 @@ class ConstrueClient:
|
|
|
196
198
|
request_options: typing.Optional[RequestOptions] = None,
|
|
197
199
|
) -> ListCodesResponse:
|
|
198
200
|
"""
|
|
199
|
-
Returns a paginated list of all codes in the specified code system.
|
|
201
|
+
Returns a paginated list of all codes in the specified code system from the terminology server.
|
|
202
|
+
|
|
203
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
200
204
|
|
|
201
205
|
Parameters
|
|
202
206
|
----------
|
|
@@ -248,7 +252,9 @@ class ConstrueClient:
|
|
|
248
252
|
request_options: typing.Optional[RequestOptions] = None,
|
|
249
253
|
) -> GetCodeResponse:
|
|
250
254
|
"""
|
|
251
|
-
|
|
255
|
+
Looks up a specific code in the terminology server and returns its details.
|
|
256
|
+
|
|
257
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
252
258
|
|
|
253
259
|
Parameters
|
|
254
260
|
----------
|
|
@@ -313,6 +319,8 @@ class ConstrueClient:
|
|
|
313
319
|
|
|
314
320
|
See also: `/search/text` for faster keyword-based lookup with typo tolerance.
|
|
315
321
|
|
|
322
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
323
|
+
|
|
316
324
|
Parameters
|
|
317
325
|
----------
|
|
318
326
|
codesystem : str
|
|
@@ -354,7 +362,7 @@ class ConstrueClient:
|
|
|
354
362
|
)
|
|
355
363
|
return _response.data
|
|
356
364
|
|
|
357
|
-
def
|
|
365
|
+
def terminology_server_text_search(
|
|
358
366
|
self,
|
|
359
367
|
codesystem: str,
|
|
360
368
|
*,
|
|
@@ -383,6 +391,8 @@ class ConstrueClient:
|
|
|
383
391
|
|
|
384
392
|
See also: `/search/semantic` for finding conceptually similar codes.
|
|
385
393
|
|
|
394
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
395
|
+
|
|
386
396
|
Parameters
|
|
387
397
|
----------
|
|
388
398
|
codesystem : str
|
|
@@ -412,14 +422,14 @@ class ConstrueClient:
|
|
|
412
422
|
client = phenoml(
|
|
413
423
|
token="YOUR_TOKEN",
|
|
414
424
|
)
|
|
415
|
-
client.construe.
|
|
425
|
+
client.construe.terminology_server_text_search(
|
|
416
426
|
codesystem="ICD-10-CM",
|
|
417
427
|
q="E11.65",
|
|
418
428
|
version="version",
|
|
419
429
|
limit=1,
|
|
420
430
|
)
|
|
421
431
|
"""
|
|
422
|
-
_response = self._raw_client.
|
|
432
|
+
_response = self._raw_client.terminology_server_text_search(
|
|
423
433
|
codesystem, q=q, version=version, limit=limit, request_options=request_options
|
|
424
434
|
)
|
|
425
435
|
return _response.data
|
|
@@ -454,7 +464,7 @@ class AsyncConstrueClient:
|
|
|
454
464
|
request_options: typing.Optional[RequestOptions] = None,
|
|
455
465
|
) -> ConstrueUploadCodeSystemResponse:
|
|
456
466
|
"""
|
|
457
|
-
Upload a custom medical code system with codes and descriptions for use in code extraction.
|
|
467
|
+
Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
|
|
458
468
|
Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
|
|
459
469
|
subsequently use the code system for construe/extract and lang2fhir/create (coming soon!)
|
|
460
470
|
|
|
@@ -536,7 +546,9 @@ class AsyncConstrueClient:
|
|
|
536
546
|
request_options: typing.Optional[RequestOptions] = None,
|
|
537
547
|
) -> ExtractCodesResult:
|
|
538
548
|
"""
|
|
539
|
-
Converts natural language text into structured medical codes
|
|
549
|
+
Converts natural language text into structured medical codes.
|
|
550
|
+
|
|
551
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
540
552
|
|
|
541
553
|
Parameters
|
|
542
554
|
----------
|
|
@@ -583,7 +595,7 @@ class AsyncConstrueClient:
|
|
|
583
595
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
584
596
|
) -> ListCodeSystemsResponse:
|
|
585
597
|
"""
|
|
586
|
-
Returns
|
|
598
|
+
Returns the terminology server's catalog of available code systems, including both built-in standard terminologies and custom uploaded systems.
|
|
587
599
|
|
|
588
600
|
Parameters
|
|
589
601
|
----------
|
|
@@ -625,7 +637,9 @@ class AsyncConstrueClient:
|
|
|
625
637
|
request_options: typing.Optional[RequestOptions] = None,
|
|
626
638
|
) -> ListCodesResponse:
|
|
627
639
|
"""
|
|
628
|
-
Returns a paginated list of all codes in the specified code system.
|
|
640
|
+
Returns a paginated list of all codes in the specified code system from the terminology server.
|
|
641
|
+
|
|
642
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
629
643
|
|
|
630
644
|
Parameters
|
|
631
645
|
----------
|
|
@@ -685,7 +699,9 @@ class AsyncConstrueClient:
|
|
|
685
699
|
request_options: typing.Optional[RequestOptions] = None,
|
|
686
700
|
) -> GetCodeResponse:
|
|
687
701
|
"""
|
|
688
|
-
|
|
702
|
+
Looks up a specific code in the terminology server and returns its details.
|
|
703
|
+
|
|
704
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
689
705
|
|
|
690
706
|
Parameters
|
|
691
707
|
----------
|
|
@@ -758,6 +774,8 @@ class AsyncConstrueClient:
|
|
|
758
774
|
|
|
759
775
|
See also: `/search/text` for faster keyword-based lookup with typo tolerance.
|
|
760
776
|
|
|
777
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
778
|
+
|
|
761
779
|
Parameters
|
|
762
780
|
----------
|
|
763
781
|
codesystem : str
|
|
@@ -807,7 +825,7 @@ class AsyncConstrueClient:
|
|
|
807
825
|
)
|
|
808
826
|
return _response.data
|
|
809
827
|
|
|
810
|
-
async def
|
|
828
|
+
async def terminology_server_text_search(
|
|
811
829
|
self,
|
|
812
830
|
codesystem: str,
|
|
813
831
|
*,
|
|
@@ -836,6 +854,8 @@ class AsyncConstrueClient:
|
|
|
836
854
|
|
|
837
855
|
See also: `/search/semantic` for finding conceptually similar codes.
|
|
838
856
|
|
|
857
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
858
|
+
|
|
839
859
|
Parameters
|
|
840
860
|
----------
|
|
841
861
|
codesystem : str
|
|
@@ -870,7 +890,7 @@ class AsyncConstrueClient:
|
|
|
870
890
|
|
|
871
891
|
|
|
872
892
|
async def main() -> None:
|
|
873
|
-
await client.construe.
|
|
893
|
+
await client.construe.terminology_server_text_search(
|
|
874
894
|
codesystem="ICD-10-CM",
|
|
875
895
|
q="E11.65",
|
|
876
896
|
version="version",
|
|
@@ -880,7 +900,7 @@ class AsyncConstrueClient:
|
|
|
880
900
|
|
|
881
901
|
asyncio.run(main())
|
|
882
902
|
"""
|
|
883
|
-
_response = await self._raw_client.
|
|
903
|
+
_response = await self._raw_client.terminology_server_text_search(
|
|
884
904
|
codesystem, q=q, version=version, limit=limit, request_options=request_options
|
|
885
905
|
)
|
|
886
906
|
return _response.data
|
|
@@ -51,7 +51,7 @@ class RawConstrueClient:
|
|
|
51
51
|
request_options: typing.Optional[RequestOptions] = None,
|
|
52
52
|
) -> HttpResponse[ConstrueUploadCodeSystemResponse]:
|
|
53
53
|
"""
|
|
54
|
-
Upload a custom medical code system with codes and descriptions for use in code extraction.
|
|
54
|
+
Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
|
|
55
55
|
Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
|
|
56
56
|
subsequently use the code system for construe/extract and lang2fhir/create (coming soon!)
|
|
57
57
|
|
|
@@ -187,7 +187,9 @@ class RawConstrueClient:
|
|
|
187
187
|
request_options: typing.Optional[RequestOptions] = None,
|
|
188
188
|
) -> HttpResponse[ExtractCodesResult]:
|
|
189
189
|
"""
|
|
190
|
-
Converts natural language text into structured medical codes
|
|
190
|
+
Converts natural language text into structured medical codes.
|
|
191
|
+
|
|
192
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
191
193
|
|
|
192
194
|
Parameters
|
|
193
195
|
----------
|
|
@@ -287,7 +289,7 @@ class RawConstrueClient:
|
|
|
287
289
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
288
290
|
) -> HttpResponse[ListCodeSystemsResponse]:
|
|
289
291
|
"""
|
|
290
|
-
Returns
|
|
292
|
+
Returns the terminology server's catalog of available code systems, including both built-in standard terminologies and custom uploaded systems.
|
|
291
293
|
|
|
292
294
|
Parameters
|
|
293
295
|
----------
|
|
@@ -351,7 +353,9 @@ class RawConstrueClient:
|
|
|
351
353
|
request_options: typing.Optional[RequestOptions] = None,
|
|
352
354
|
) -> HttpResponse[ListCodesResponse]:
|
|
353
355
|
"""
|
|
354
|
-
Returns a paginated list of all codes in the specified code system.
|
|
356
|
+
Returns a paginated list of all codes in the specified code system from the terminology server.
|
|
357
|
+
|
|
358
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
355
359
|
|
|
356
360
|
Parameters
|
|
357
361
|
----------
|
|
@@ -453,7 +457,9 @@ class RawConstrueClient:
|
|
|
453
457
|
request_options: typing.Optional[RequestOptions] = None,
|
|
454
458
|
) -> HttpResponse[GetCodeResponse]:
|
|
455
459
|
"""
|
|
456
|
-
|
|
460
|
+
Looks up a specific code in the terminology server and returns its details.
|
|
461
|
+
|
|
462
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
457
463
|
|
|
458
464
|
Parameters
|
|
459
465
|
----------
|
|
@@ -567,6 +573,8 @@ class RawConstrueClient:
|
|
|
567
573
|
|
|
568
574
|
See also: `/search/text` for faster keyword-based lookup with typo tolerance.
|
|
569
575
|
|
|
576
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
577
|
+
|
|
570
578
|
Parameters
|
|
571
579
|
----------
|
|
572
580
|
codesystem : str
|
|
@@ -658,7 +666,7 @@ class RawConstrueClient:
|
|
|
658
666
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
659
667
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
660
668
|
|
|
661
|
-
def
|
|
669
|
+
def terminology_server_text_search(
|
|
662
670
|
self,
|
|
663
671
|
codesystem: str,
|
|
664
672
|
*,
|
|
@@ -687,6 +695,8 @@ class RawConstrueClient:
|
|
|
687
695
|
|
|
688
696
|
See also: `/search/semantic` for finding conceptually similar codes.
|
|
689
697
|
|
|
698
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
699
|
+
|
|
690
700
|
Parameters
|
|
691
701
|
----------
|
|
692
702
|
codesystem : str
|
|
@@ -819,7 +829,7 @@ class AsyncRawConstrueClient:
|
|
|
819
829
|
request_options: typing.Optional[RequestOptions] = None,
|
|
820
830
|
) -> AsyncHttpResponse[ConstrueUploadCodeSystemResponse]:
|
|
821
831
|
"""
|
|
822
|
-
Upload a custom medical code system with codes and descriptions for use in code extraction.
|
|
832
|
+
Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
|
|
823
833
|
Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
|
|
824
834
|
subsequently use the code system for construe/extract and lang2fhir/create (coming soon!)
|
|
825
835
|
|
|
@@ -955,7 +965,9 @@ class AsyncRawConstrueClient:
|
|
|
955
965
|
request_options: typing.Optional[RequestOptions] = None,
|
|
956
966
|
) -> AsyncHttpResponse[ExtractCodesResult]:
|
|
957
967
|
"""
|
|
958
|
-
Converts natural language text into structured medical codes
|
|
968
|
+
Converts natural language text into structured medical codes.
|
|
969
|
+
|
|
970
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
959
971
|
|
|
960
972
|
Parameters
|
|
961
973
|
----------
|
|
@@ -1055,7 +1067,7 @@ class AsyncRawConstrueClient:
|
|
|
1055
1067
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
1056
1068
|
) -> AsyncHttpResponse[ListCodeSystemsResponse]:
|
|
1057
1069
|
"""
|
|
1058
|
-
Returns
|
|
1070
|
+
Returns the terminology server's catalog of available code systems, including both built-in standard terminologies and custom uploaded systems.
|
|
1059
1071
|
|
|
1060
1072
|
Parameters
|
|
1061
1073
|
----------
|
|
@@ -1119,7 +1131,9 @@ class AsyncRawConstrueClient:
|
|
|
1119
1131
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1120
1132
|
) -> AsyncHttpResponse[ListCodesResponse]:
|
|
1121
1133
|
"""
|
|
1122
|
-
Returns a paginated list of all codes in the specified code system.
|
|
1134
|
+
Returns a paginated list of all codes in the specified code system from the terminology server.
|
|
1135
|
+
|
|
1136
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
1123
1137
|
|
|
1124
1138
|
Parameters
|
|
1125
1139
|
----------
|
|
@@ -1221,7 +1235,9 @@ class AsyncRawConstrueClient:
|
|
|
1221
1235
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1222
1236
|
) -> AsyncHttpResponse[GetCodeResponse]:
|
|
1223
1237
|
"""
|
|
1224
|
-
|
|
1238
|
+
Looks up a specific code in the terminology server and returns its details.
|
|
1239
|
+
|
|
1240
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
1225
1241
|
|
|
1226
1242
|
Parameters
|
|
1227
1243
|
----------
|
|
@@ -1335,6 +1351,8 @@ class AsyncRawConstrueClient:
|
|
|
1335
1351
|
|
|
1336
1352
|
See also: `/search/text` for faster keyword-based lookup with typo tolerance.
|
|
1337
1353
|
|
|
1354
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
1355
|
+
|
|
1338
1356
|
Parameters
|
|
1339
1357
|
----------
|
|
1340
1358
|
codesystem : str
|
|
@@ -1426,7 +1444,7 @@ class AsyncRawConstrueClient:
|
|
|
1426
1444
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
1427
1445
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
1428
1446
|
|
|
1429
|
-
async def
|
|
1447
|
+
async def terminology_server_text_search(
|
|
1430
1448
|
self,
|
|
1431
1449
|
codesystem: str,
|
|
1432
1450
|
*,
|
|
@@ -1455,6 +1473,8 @@ class AsyncRawConstrueClient:
|
|
|
1455
1473
|
|
|
1456
1474
|
See also: `/search/semantic` for finding conceptually similar codes.
|
|
1457
1475
|
|
|
1476
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
1477
|
+
|
|
1458
1478
|
Parameters
|
|
1459
1479
|
----------
|
|
1460
1480
|
codesystem : str
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
+
from .citation import Citation
|
|
5
6
|
from .code_response import CodeResponse
|
|
6
7
|
from .code_system_details import CodeSystemDetails
|
|
7
8
|
from .code_system_info import CodeSystemInfo
|
|
@@ -22,6 +23,7 @@ from .text_search_result import TextSearchResult
|
|
|
22
23
|
from .upload_request_format import UploadRequestFormat
|
|
23
24
|
|
|
24
25
|
__all__ = [
|
|
26
|
+
"Citation",
|
|
25
27
|
"CodeResponse",
|
|
26
28
|
"CodeSystemDetails",
|
|
27
29
|
"CodeSystemInfo",
|
|
@@ -0,0 +1,36 @@
|
|
|
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 Citation(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
A reference to source text that led to a code extraction
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
text: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
The exact text span containing evidence for the code
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
begin_offset: int = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Starting byte offset in the original input text (0-indexed)
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
end_offset: int = pydantic.Field()
|
|
25
|
+
"""
|
|
26
|
+
Ending byte offset (exclusive), such that input[begin_offset:end_offset] == text
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
if IS_PYDANTIC_V2:
|
|
30
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
31
|
+
else:
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
frozen = True
|
|
35
|
+
smart_union = True
|
|
36
|
+
extra = pydantic.Extra.allow
|
|
@@ -50,6 +50,15 @@ class ExtractRequestConfig(UniversalBaseModel):
|
|
|
50
50
|
Whether to include codes that failed validation in the results
|
|
51
51
|
"""
|
|
52
52
|
|
|
53
|
+
include_citations: typing.Optional[bool] = pydantic.Field(default=None)
|
|
54
|
+
"""
|
|
55
|
+
Whether to include source text citations for each extracted code.
|
|
56
|
+
Citations show the exact text spans (with character offsets) that led to each code.
|
|
57
|
+
Only available when using chunking_method: "sentences".
|
|
58
|
+
The "none" method returns full text as one chunk (not useful for citations).
|
|
59
|
+
LLM-based chunking (paragraphs, topics) does not support citations.
|
|
60
|
+
"""
|
|
61
|
+
|
|
53
62
|
if IS_PYDANTIC_V2:
|
|
54
63
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
55
64
|
else:
|
|
@@ -21,7 +21,9 @@ class ExtractRequestSystem(UniversalBaseModel):
|
|
|
21
21
|
* CPT - version 2025
|
|
22
22
|
|
|
23
23
|
Custom systems:
|
|
24
|
-
* Any valid system name
|
|
24
|
+
* Any valid system name uploaded via /construe/upload. Requires a paid plan.
|
|
25
|
+
|
|
26
|
+
Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
25
27
|
"""
|
|
26
28
|
|
|
27
29
|
version: typing.Optional[str] = pydantic.Field(default=None)
|
|
@@ -6,6 +6,7 @@ import pydantic
|
|
|
6
6
|
import typing_extensions
|
|
7
7
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
8
|
from ...core.serialization import FieldMetadata
|
|
9
|
+
from .citation import Citation
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class ExtractedCodeResult(UniversalBaseModel):
|
|
@@ -36,6 +37,19 @@ class ExtractedCodeResult(UniversalBaseModel):
|
|
|
36
37
|
Explanation for why this code was extracted (if include_rationale is true)
|
|
37
38
|
"""
|
|
38
39
|
|
|
40
|
+
is_ancestor: typing.Optional[bool] = pydantic.Field(default=None)
|
|
41
|
+
"""
|
|
42
|
+
Whether this code is an ancestor (parent) of an extracted code rather than directly extracted.
|
|
43
|
+
Only present when include_ancestors is true.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
citations: typing.Optional[typing.List[Citation]] = pydantic.Field(default=None)
|
|
47
|
+
"""
|
|
48
|
+
Source text references showing where this code was found in the input.
|
|
49
|
+
Only present when include_citations is true and chunking method supports it.
|
|
50
|
+
Ancestor codes do not receive citations.
|
|
51
|
+
"""
|
|
52
|
+
|
|
39
53
|
if IS_PYDANTIC_V2:
|
|
40
54
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
41
55
|
else:
|
|
@@ -22,10 +22,10 @@ class BaseClientWrapper:
|
|
|
22
22
|
|
|
23
23
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
24
24
|
headers: typing.Dict[str, str] = {
|
|
25
|
-
"User-Agent": "phenoml/
|
|
25
|
+
"User-Agent": "phenoml/3.0.0",
|
|
26
26
|
"X-Fern-Language": "Python",
|
|
27
27
|
"X-Fern-SDK-Name": "phenoml",
|
|
28
|
-
"X-Fern-SDK-Version": "
|
|
28
|
+
"X-Fern-SDK-Version": "3.0.0",
|
|
29
29
|
**(self.get_custom_headers() or {}),
|
|
30
30
|
}
|
|
31
31
|
headers["Authorization"] = f"Bearer {self._get_token()}"
|
|
@@ -15,9 +15,10 @@ from .types import (
|
|
|
15
15
|
FhirResourceMeta,
|
|
16
16
|
FhirSearchResponse,
|
|
17
17
|
)
|
|
18
|
-
from .errors import BadRequestError, InternalServerError, NotFoundError, UnauthorizedError
|
|
18
|
+
from .errors import BadGatewayError, BadRequestError, InternalServerError, NotFoundError, UnauthorizedError
|
|
19
19
|
|
|
20
20
|
__all__ = [
|
|
21
|
+
"BadGatewayError",
|
|
21
22
|
"BadRequestError",
|
|
22
23
|
"ErrorResponse",
|
|
23
24
|
"FhirBundle",
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
+
from .bad_gateway_error import BadGatewayError
|
|
5
6
|
from .bad_request_error import BadRequestError
|
|
6
7
|
from .internal_server_error import InternalServerError
|
|
7
8
|
from .not_found_error import NotFoundError
|
|
8
9
|
from .unauthorized_error import UnauthorizedError
|
|
9
10
|
|
|
10
|
-
__all__ = ["BadRequestError", "InternalServerError", "NotFoundError", "UnauthorizedError"]
|
|
11
|
+
__all__ = ["BadGatewayError", "BadRequestError", "InternalServerError", "NotFoundError", "UnauthorizedError"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.api_error import ApiError
|
|
6
|
+
from ..types.error_response import ErrorResponse
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class BadGatewayError(ApiError):
|
|
10
|
+
def __init__(self, body: ErrorResponse, headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
11
|
+
super().__init__(status_code=502, headers=headers, body=body)
|