Commit Graph

18 Commits

Author SHA1 Message Date
Mayank Aamseek 138ac82fa2 Merged in hotfix/file-errors (pull request #448)
Hotfix/file errors

* Set up test file

* Fix regex pattern in json.loads

*  bug fix No valid JSON object found in the input string

* bug fixes

* moved try statement to parse fn

* invalid literal for int() with base 10 error fixed

* remove test

* remove excess print statements

* Raise error

* Remove todo

* Remove print statement


Approved-by: Katon Minhas
2025-03-19 22:11:27 +00:00
Katon Minhas 31b2936ae6 Merged in bugfix/table-failed-files (pull request #445)
Bugfix/table failed files

* improved align and format table prompt

* Successful E2E test on San Joaquin - without running align and format table prompt

* San Joaquin e2e test passed

* Merged main into bugfix/table-error-fix

* Merge branch 'main' into bugfix/table-error-fix

* Add same number of columns condition

* Merged main into bugfix/table-error-fix

* Clean investment_values

* Remove import

* docstrings

* Remove test doc

* Add back original ALIGN_AND_FORMAT_TABLES prompt for client work

* Remove import

* Add config reference

* expected string or bytes-like object, got 'int'

* Merged main into bugfix/table-error-fix

* Merge branch 'bugfix/table-error-fix' into bugfix/table-failed-files

* Update universal json load

* update test

* Merge branch 'main' into bugfix/table-failed-files

* Position 0 error fixed

* update table_utils

* remove test.py

* revert table_utils test

* remove table_utils_test


Approved-by: Alex Galarce
2025-03-18 20:12:47 +00:00
Katon Minhas 86db2ea0b7 Merged in bugfix/table-error-fix (pull request #444)
Bugfix/table error fix

* handle multipage table data correctly

* same metadata for all tables on the page

* Multiple tables on page, non-continuous, split

* Add back align_and_format_tables

* update unit tests

* Merged main into bugfix/table-error-fix

* improved align and format table prompt

* Successful E2E test on San Joaquin - without running align and format table prompt

* San Joaquin e2e test passed

* Merged main into bugfix/table-error-fix

* Merge branch 'main' into bugfix/table-error-fix

* Add same number of columns condition

* Merged main into bugfix/table-error-fix

* Clean investment_values

* Remove import

* docstrings

* Remove test doc

* Add back original ALIGN_AND_FORMAT_TABLES prompt for client work

* Remove import

* Add config reference

* Merged main into bugfix/table-error-fix

* Move table_utils to investment.table_funcs

* restore table_utils.py

* Update tests

* update preprocess


Approved-by: Alex Galarce
2025-03-18 18:41:31 +00:00
Alex Galarce cb6284c98f Merged in feature/add-billed-charges-to-reimb-keywords (pull request #436)
Small fix to comparisons (lowercase comparison string fields)

* Add accuracy calculation to fuzzy matching evaluation

* reimbursement primary accuracy test

* add match_threshold control

* clarify metrics

* Merged main into reimb-primary-accuracy-analysis

* Merge branch 'reimb-primary-accuracy-analysis' of https://bitbucket.org/aarete/doczy.ai into reimb-primary-accuracy-analysis

* add 'billed charges' to reimbursement keywords and update TODO for page checking

* add comparisons dictionary

* normalize field comparison by converting strings to lowercase

* deduplicate data sources in notebook

* Merge remote-tracking branch 'origin/main' into feature/add-billed-charges-to-reimb-keywords


Approved-by: Katon Minhas
2025-03-06 21:42:43 +00:00
Alex Galarce 2f96963162 Merged in feature/reimbursement-primary-optimizization (pull request #428)
Fix load_embeddings()

* move datetime_str function to string_utils module

* enhance load_embeddings to create directory structure and handle download errors

* Merged main into feature/reimbursement-primary-optimizization


Approved-by: Katon Minhas
2025-03-04 22:08:16 +00:00
Mayank Aamseek 54b3b74675 Merged in daip2-111 (pull request #424)
Daip2 111

* indirect proc codes added

* bug fix

* bug fix

* Merge branch 'main' into proc-code-indirect

* bug fix

* diag cd indirect added

* Merge branch 'main' into daip2-111

* bug fix

* deleted missed print statements

* Merge branch 'main' into daip2-111
merged with main

* Merge branch 'main' into daip2-111
pulled from main

* sync embeddings from s3

* print statement removed

* typehint added


Approved-by: Alex Galarce
2025-03-04 16:52:14 +00:00
Katon Minhas 92029cdabe Merged in bugfix/proc-code-lists (pull request #403)
Bugfix/proc code lists

* Add admit type code

* add proc mod description

* Add bill type pos mapping

* Merged main into feature/proc-desc

* Uncomment test code

* Bugfix

* script optimisation for codes

* modified is empty function in string utils

* Remove test.py

* bug fix to handle list of proc_codes

* Merged main into bugfix/proc-code-lists

* changed any method to all method in list handling

* code mapping moved outside to run once

* Merge branch 'feature/daip2-97' into bugfix/proc-code-lists

* merge conflict fixed

* merge conflicts fixed

* incorporated latest changes from main

* Merged main into bugfix/proc-code-lists

* Move load all dataset to io_utils

* Fix list is_empty

* Updated poetry.lock

* Docstring

* Docstrings

* Merge branch 'main' into bugfix/proc-code-lists

* bug fix


Approved-by: Mayank Aamseek
Approved-by: Alex Galarce
2025-02-21 14:44:36 +00:00
Alex Galarce 073995a945 Merged in hotfix/fix_chroma_add_timestamps (pull request #405)
Hotfix/fix chroma add timestamps

* re-add chroma persistence

* add timestamps

* Merged main into hotfix/fix_chroma_add_timestamps

* add timestamp to file processing log message

* forgot parentheses to actually write datetime


Approved-by: Katon Minhas
2025-02-20 20:19:53 +00:00
Katon Minhas 664397d713 Merged in feature/proc-desc (pull request #400)
feature/proc desc

* Update crosswalks - individual code level

* add embeddings

* Update embeddings

* Proc mappings

* code description mapping for PROC codes

* Code map bug fixes

* docstrings

* Initialize Rev and Diag descriptions

* Add 0 to front for rev codes

* Comments

* Merged main into feature/proc-desc

* Comments

* Separate grouper and diag codes

* add grouper version

* Bugfix"

* Add admit type code

* add proc mod description

* Add bill type pos mapping

* Merged main into feature/proc-desc

* Uncomment test code

* Bugfix

* Remove test.py

* list bugfix

* Merged main into feature/proc-desc

* concurrency


Approved-by: Alex Galarce
2025-02-20 04:10:33 +00:00
Alex Galarce b0c1730a0a Merged in hotfix/remove-persistent-chroma (pull request #398)
remove chroma persistence and add print statements

* remove chroma persistence and add print statements

* add print statement for file writing completion and remove commented-out code


Approved-by: Katon Minhas
2025-02-14 22:43:01 +00:00
Katon Minhas 2535400124 Merged in feature/claude-cache (pull request #392)
Feature/claude cache

* Add Bill Type

* cache for llm_utils invoke_claude

* Merged main into feature/claude-cache

* LRUCache class

* Move to OrderedDict cache

* Remove lru cache call


Approved-by: Alex Galarce
2025-02-11 21:16:11 +00:00
Katon Minhas fa082d429b Merged in hotfix/fix_carveout_return (pull request #378)
Fix carveout ind call

* Fix carveout ind call


Approved-by: Alex Galarce
2025-01-31 19:45:33 +00:00
Katon Minhas 063c95d6ac Merged in feature/dynamic_and_generalized_branch (pull request #361)
feature/dynamic and generalized branch

* included txt files for nltk_data

* move nltk_data to src

* Fix last upload count

* Last upload count bugfix

* Fixed B processing

* Remove client-specific postprocessing

* split consolidate_output

* Run by file

* Fix output

* Reconfigure smart_chunk fields

* Add Full Context

* Fix merge conflicts

* Regex, Smart-Chunked, and Full working - not adding smart-chunked-->full when necessary

* Modernized run_full_context_fields()

* Switched set to list in field_context

* Move fields from smart_chunked to full_context as part of 'field_context' function

* Working version with placeholders

* Update poetry and pyproject

* Update s3 output

* Remove deprecated unit test

* Updated error messages

* Updated smart chunk ac name to one to one

* Update dependencies - end-to-end test for write s3 functional

* Add basic multithreading

* Send individual output to s3/local


Approved-by: Alex Galarce
2025-01-27 19:39:23 +00:00
Alex Galarce d345dd0ed3 Merged in feature/integrate-standard-and-complex (pull request #356)
Feature/integrate standard and complex

* last edits to merge_tables_draft_v2 before moving to table_funcs

* migrate to table_utils.py

* fix typehint that caused mypy error

* fix mypy errors

* black and isort

* fix error with multi-table pages

* update poetry.lock

* add tests, fix bug when table start marker or table end marker is missing

* added more tests

* tests for get_str_dictionaries_from_text()

* fix edge case in get_str_dictionaries_from_text

* fix mypy error

* more tests

* add tests, add handling for invalid dictionaries

* add tests

* add tests for insert_column_headers()

* update requirements

* add new simple/complex logic to preprocess.py

* remove files used solely for testing

* split pages into sub-pages by tables

* add table split on end marker.  Also add tests

* add docstrings, change control flow

* remove unused tests, add TODO for new tests

* get in prompt changes and intermediate decisions

* TODO for future enhancement for get_exhibit_pages


Approved-by: Katon Minhas
2025-01-24 22:46:59 +00:00
Katon Minhas dfbe47ef28 Merged in refactor/prompt_refactor (pull request #353)
READY: Refactor/prompt refactor

* Prompt refactor

* refactor imports

* Prompt refactor

* Import refactor

* Remove excess prompts from investment_prompts.py


Approved-by: Alex Galarce
2025-01-13 21:11:36 +00:00
Katon Minhas 3bb6abbcef Merged in feature/simplify-b-field-chunking (pull request #348)
feature/simplify b field chunking

* Add chunk_by_exhibit function and unit tests

* Refactor preprocess

* Updated to run BU primary on entire Exhibit

* Makes BU secondary compatible with exhibit chunk mapping

* Added unit tests for get_exhibit_chunk

* Trimmed TD funcs

* Downstream changes to run_top_down

* Removed conditional funcs

* Merged main into feature/simplify-b-field-chunking

* removed conditional funcs import

* Merged main into feature/simplify-b-field-chunking

* Fixed run_bottom_up_primary arguments

* Fixed TD primary input

* Fixed grouped keyword mappings

* Remove filename tracking until postprocessing

* Removed postprocessing for client columns

* Removed col-based postprocessing

* Merged main into feature/simplify-b-field-chunking

* Fixed NoneType

* Add docstrings

* Updated unit tests for removal of 'Filename'

* Updated comments


Approved-by: Alex Galarce
2025-01-10 17:24:44 +00:00
Siddhant Medar ab71bd8dae Merged in task/unit-tests-investment-and-client (pull request #346)
Task/unit tests investment and client

* move io_utils.py

* add __init__.py

* refactor: move string_funcs and update import paths to use utils namespace

* rename string_funcs to string_utils

* move and rename table_utils.py

* refactor: rename claude_funcs to llm_utils in multiple files

* update unit tests

* added unit tests for src/string_utils.py

* added unit tests for src/table_utils.py

* added unit tests for src/llm_utils.py

* added unit tests for src/io_utils.py

* Merge branch 'main' into task/unit-tests-investment-and-client; TODO: fix unit tests

* Unit tests to fix

* fix unit tests

* fix invalid references


Approved-by: Alex Galarce
2025-01-09 17:59:28 +00:00
Alex Galarce 53b38ea15c Merged in refactor/split-investment-and-client (pull request #347)
Refactor/split investment and client

* refactor: clean up tests

* Renamed tests/qcqa to tests/qa_qc for consistency

* comment out faulty test - see docstring note at top

* split to client/investment

* add __init__.py to investment and client to avoid mypy confusion

* fix imports

* update imports for consistency across investment module

* move back to one config

* try changing import to relative

* add init.py to src

* try relative import

* try one more sys.path.append

* fix path for client main

* fix imports in file_processing

* make prompts common

* move keywords out to `src`

* move smart_chunking_funcs to `src`

* fix mypy error

* start moving to explicit imports

* remove old keywords and fix imports for keywords and prompts

* change all imports to full paths

* fix unit tests

* add readme for new way of running things

* isort after all that import work

* remove unused sys.path.append from some tests


Approved-by: Katon Minhas
2025-01-08 21:59:47 +00:00