deef52193c
DEV * file_processing * Merge branch 'bugfix/code_implicit' into DEV * Update split reimb dates condition * Pipe line general fixes, fixed tests, ran black, and fixed mypy type check issues, still have a list of lists issue with prov other name full * Merged in feature/update-claim-type (pull request #869) Feature/update claim type * Update CLAIM_TYPE_CD extraction to prioritize title/header - Modified retrieval_question to search for title, header, and agreement name - Updated prompt to check title/header first before analyzing body text - Enhanced FULL_CONTEXT_CLAIM_TYPES_ADDITIONAL_INSTRUCTION to emphasize title/header as primary source * Fix CLAIM_TYPE_CD extraction with 3-step fallback 1. Exhibit Level: Updated retrieval_question and prompt to prioritize title/header 2. Contract Title fallback: Added infer_claim_type_from_title() function that extracts claim type from CONTRACT_TITLE when exhibit-level extraction returns empty 3. Postprocessing: fill_claim_type() now uses CONTRACT_TITLE inference when all AARETE_DERIVED_CLAIM_TYPE_CD values are empty Keywords mapped: - Professional/Ancillary -> M (Physician, Professional, Ancillary, Home Health, DME, etc.) - Institutional -> H (Hospital, Facility, Surgery Center, SNF, etc.) * Add more prof… * Merged in bugfix/code-funcs (pull request #872) Bugfix/code funcs * Try-except code extraction * Additional try-except for protection * Black format Approved-by: Praneel Panchigar * Merged in feature/update-testbed-metrics (pull request #871) Feature/update testbed metrics * Combine fee schedule with methodology breakout; remove Reimbursement primary; do not run trigger cap or additions * Deprecate reimb primary functions * combine multiple sheets to one * Clean 1:N metrics * Improve dynamic primary evaluation * Resolve dynamic primary * Update row counts * black format * Merged DEV into feature/update-testbed-metrics Approved-by: Praneel Panchigar * Merged in feature/adding_contract_admenment_num_pc (pull request #870) Feature/adding contract admenment num pc * Updated contract amendment * Format code with Black * updated to have letters * format fixes * Adjusted unit testing * Merge remote-tracking branch 'origin/DEV' into feature/adding_contract_admenment_num_pc * apply formatting * format fixes * Merge remote-tracking branch 'origin/DEV' into feature/adding_contract_admenment_num_pc * test conflicts solved * Format code with Black * format fixes * reverted the changes for prompt templates * test_case reverted * Sorted effective date for ranking * format fix for lint * Merged DEV into feature/adding_contract_admenment_num_pc * format * Merged DEV into feature/adding_contract_admenment_num_pc * Merged DEV into feature/adding_contract_admenment_num_pc Approved-by: Siddhant Medar * Consolidate docs and documentation * Remove PRD * Add Essential Plan as a NY Program * Resolve Comments * Resolve comments * Black format * Resolve remaining comments * Black format * Merged in bugfix/fill_claim_type (pull request #874) Bugfix/fill claim type * Handle if AARETE_DERIVED_CLAIM_TYPE_CD comes in as list * add unit tests * Black format Approved-by: Siddhant Medar * Remove print * Merged in bugfix/parser-downstream-improvements (pull request #875) Bugfix/parser downstream improvements * Refactor: Implement field-aware JSON parsers with centralized normalization This refactor introduces a robust system for normalizing LLM output based on field format mappings, ensuring consistent data types throughout the pipeline. Key Changes: - Add FIELD_FORMAT_MAPPING constant defining expected formats for all fields - Create format_normalization.py utility for type-aware normalization - Update json_utils.py parsers to accept field_names/field_name parameters - Refactor prompt_templates.py to use parser factories (_create_json_dict_parser, _create_json_list_parser) that bind field metadata for automatic normalization - Update prompt_calls.py to pass field names to parsers, eliminating redundant normalization logic - Remove parse_json_dict_or_list (unused, ambiguous function) - Simplify METHODOLOGY_BREAKOUT and REIMBURSEMENT_PRIMARY to use helper functions - Add comprehensive integration tests… * Update other lists * Black format * Remove prints * Update qa_qc to account for lists in is_empty check * Resolve issues * Black format Approved-by: Siddhant Medar
60 lines
1.3 KiB
TOML
60 lines
1.3 KiB
TOML
[project]
|
|
name = "doczy-field-extraction"
|
|
version = "0.1.0"
|
|
description = "Contract field extraction using LLMs"
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"pandas>=2.2.3",
|
|
"boto3>=1.35.40",
|
|
"anthropic>=0.36.0",
|
|
"python-dotenv>=1.0.1",
|
|
"psutil>=6.1.0",
|
|
"rapidfuzz>=3.10.1",
|
|
"pyxlsb>=1.0.10",
|
|
"openpyxl>=3.1.5",
|
|
"langchain>=0.3.14",
|
|
"langchainhub>=0.1.21",
|
|
"langchain-aws>=0.2.11",
|
|
"langchain-text-splitters>=0.3.5",
|
|
"langchain-community>=0.3.15",
|
|
"nltk>=3.9.1",
|
|
"rank-bm25>=0.2.2",
|
|
"sentence-transformers>=3.4.1",
|
|
"faiss-cpu>=1.10.0",
|
|
"word2number>=1.1",
|
|
"orjson>=3.10.16",
|
|
"pymupdf>=1.25.5",
|
|
"pillow>=11.2.1",
|
|
"xlsxwriter>=3.2.9",
|
|
"langchain-classic>=1.0.1",
|
|
"black[jupyter]>=25.12.0",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"mypy>=1.12.0",
|
|
"jupyter>=1.1.1",
|
|
"isort>=5.13.2",
|
|
"pytest>=8.3.3",
|
|
"pytest-mock>=3.14.0",
|
|
]
|
|
test = [
|
|
"pytest>=8.3.3",
|
|
"pytest-mock>=3.14.0",
|
|
"pytest-cov>=6.0.0",
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 88
|
|
target-version = ['py312']
|
|
|
|
[tool.mypy]
|
|
disable_error_code = ["import-untyped","assignment","name-defined","call-arg","var-annotated","attr-defined","arg-type","return-value"]
|
|
exclude = ["scripts/"]
|
|
explicit_package_bases = true
|
|
|
|
[tool.pytest.ini_options]
|
|
pythonpath = ["."]
|
|
testpaths = ["src/tests"]
|