Commit Graph

1249 Commits

Author SHA1 Message Date
VenkataKrishna Reddy Avula 732d345d7f Merged in feature/daip2-123 (pull request #425)
Feature/daip2-123 to Main

* 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

* modified get code description for revenue codes

* removed print statements

* Merged main into feature/daip2-123

* Merge remote-tracking branch 'origin/main' into feature/daip2-123

* Merged main into feature/daip2-123

* modified find containing ranges

* modified get code description

* updated get code description function

* updated descriptions code

* Merge remote-tracking branch 'origin/main' into feature/daip2-123


Approved-by: Katon Minhas
2025-03-06 18:51:05 +00:00
Alex Galarce d55a4b8fd2 Merged in reimb-primary-accuracy-analysis (pull request #433)
Reimb primary accuracy analysis

* 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


Approved-by: Katon Minhas
2025-03-06 14:55:59 +00:00
Alex Galarce 4c0bb5d1f7 Merged in bugfix/improve-stability (pull request #432)
very small error logging fix

* Handle ValueError in code range parsing and provide fallback

* Implement safe file processing with error handling and concurrent execution

* Merge remote-tracking branch 'origin/main' into bugfix/improve-stability

* more explicit error printing

* Merge remote-tracking branch 'origin/main' into bugfix/improve-stability


Approved-by: Katon Minhas
2025-03-06 04:05:29 +00:00
Rahul Ailaboina a84941ff9c Merged in bugfix/individual-prov-group-name (pull request #431)
updated prompt to get the group provider

* updated prompt to get the group provider

* Merged main into bugfix/individual-prov-group-name


Approved-by: Alex Galarce
2025-03-05 23:53:11 +00:00
Alex Galarce d7d5276d7b Merged in bugfix/improve-stability (pull request #430)
Bugfix/improve stability

* Handle ValueError in code range parsing and provide fallback

* Implement safe file processing with error handling and concurrent execution

* Merge remote-tracking branch 'origin/main' into bugfix/improve-stability


Approved-by: Katon Minhas
2025-03-05 19:10:37 +00:00
Katon Minhas e7605b550b Merged in feature/field-renaming (pull request #429)
Feature/field renaming

* Update column names

* Update field names

* Update field names

* Merge branch 'main' into feature/field-renaming

* _DATE to _DT in field names

* _CD_DESC to _DESC

* NOT_TO_EXCEED_IND added as valid field

* Remove print statements


Approved-by: Alex Galarce
2025-03-05 18:25:28 +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
Alex Galarce f7ba7f45e5 Merged in hotfix/fix-pipeline (pull request #427)
fix: update return type comment for get_best_match function

* fix: update return type comment for get_best_match function


Approved-by: Katon Minhas
2025-03-04 17:39:09 +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
Alex Galarce 08ebf92109 Merged in feature/test-1-to-n-fields (pull request #426)
Feature/test 1 to n fields

* Add function to evaluate one-to-n field comparisons and calculate metrics

* Add fuzzy matching for one-to-n field comparisons and enhance evaluation metrics

* Refactor similarity calculation to use token sort ratio for improved field comparison

* Add matched labels to evaluation metrics in one-to-n fuzzy matching


Approved-by: Katon Minhas
2025-03-04 01:16:56 +00:00
VenkataKrishna Reddy Avula 576ea95b6d Merged in code-breakout-mismaps (pull request #419)
DAIP2-112 - fixed get code descriptions

* indirect proc codes added

* bug fix

* bug fix

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

* description mapping handling X's and 0's

* bug fix

* Merge remote-tracking branch 'origin/proc-code-indirect' into code-breakout-mismaps

* testing mismaps

* revenue codes mapping for int values

* added function to find ranges

* removed test files

* Merged main into code-breakout-mismaps

* Merge branch 'main' into code-breakout-mismaps
pulled latest changes from main

* added unit test for find containing ranges

* modified find_containing_ranges_test file

* Merged main into code-breakout-mismaps

* added embeddings to git ignore

* updated find_containing_ranges_test.py


Approved-by: Alex Galarce
Approved-by: Katon Minhas
2025-03-03 16:07:29 +00:00
Alex Galarce 0fee01ace8 Merged in feature/override-aa-derived-eff-date (pull request #423)
Feature/override aa derived eff date

* Implement special handling for AARETE_DERIVED_TERMINATION_DATE based on CONTRACT_AUTO_RENEWAL_IND

* Refine prompts for CONTRACT_AUTO_RENEWAL_IND and CONTRACT_AUTO_RENEWAL_TERM for clarity

* move special handling for derived effective date to postprocess step

* Remove unnecessary blank line in get_crosswalk_and_derived function


Approved-by: Katon Minhas
2025-02-27 22:57:38 +00:00
Katon Minhas 25066747e5 Merged in hotfix/typo-fix (pull request #422)
Hotfix - typo fix

* Hotfix - reorder columns


Approved-by: Faizan Mohiuddin
Approved-by: Umang Shailesh Mistry
2025-02-27 20:31:26 +00:00
Katon Minhas 279f4fc03b Merged in feature/standardize-column-order (pull request #420)
Feature/standardize column order

* add column reordering

* Standardize column order

* Merged main into feature/standardize-column-order


Approved-by: Alex Galarce
2025-02-26 22:29:17 +00:00
Katon Minhas dd079d8556 Merged in field/contract_fee_schedule_desc (pull request #421)
Change from AARETE_DERIVED_ to CONTRACT_- FEE_SCHEDULE_VERSION

* Change from AARETE_DERIVED_ to CONTRACT_- FEE_SCHEDULE_VERSION


Approved-by: Alex Galarce
2025-02-26 21:25:45 +00:00
Mayank Aamseek 2151b4ace6 Merged in proc-code-indirect (pull request #418)
Proc code indirect

* indirect proc codes added

* bug fix

* bug fix

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

* bug fix

* Merged main into proc-code-indirect


Approved-by: Katon Minhas
2025-02-26 18:10:06 +00:00
Katon Minhas 1220f450ac Merged in field/initialize-prov-specialty (pull request #417)
field/initialize prov specialty

* Run One-To-N before One-To-One

* Switch PROV_TYPE to Exhibit-Level

* Modify PROV_TYPE prompt

* Add REIMBURSEMENT_PROV_NAME prompt

* prompt modification

* Prompt change

* Merge branch 'main' into field/initialize-reimb-prov-name

* Merge branch 'main' into field/initialize-prov-specialty

* Initialized Prov_Specialty

* Remove print statements

* Removed testing variables

* Remove test statements

* add CONTRACT_PROV_SPECIALTY

* prompt changes

* Update crosswalks

* Add mapping for lists


Approved-by: Alex Galarce
2025-02-26 14:14:30 +00:00
Alex Galarce 6d6839dcd4 Merged in hotfix/code-description-handling (pull request #416)
Hotfix/code description handling

* Update date formatting in prompts to YYYY/MM/DD

* fix tests for new date formatting

* Enhance code parsing to support comma-separated values in get_code_description function

* Merged main into hotfix/code-description-handling


Approved-by: Katon Minhas
2025-02-25 20:16:21 +00:00
Katon Minhas 1e2b96029e Merged in field/initialize-reimb-prov-name (pull request #415)
Field/initialize reimb prov name

* Run One-To-N before One-To-One

* Switch PROV_TYPE to Exhibit-Level

* Modify PROV_TYPE prompt

* Add REIMBURSEMENT_PROV_NAME prompt

* prompt modification

* Prompt change

* Merge branch 'main' into field/initialize-reimb-prov-name

* Merged main into field/initialize-reimb-prov-name


Approved-by: Alex Galarce
2025-02-25 17:14:45 +00:00
Katon Minhas ba6420102b Merged in field/reconfigure-prov-type (pull request #414)
Field/reconfigure prov type

* Run One-To-N before One-To-One

* Switch PROV_TYPE to Exhibit-Level

* Modify PROV_TYPE prompt

* Merge branch 'main' into field/reconfigure-prov-type


Approved-by: Alex Galarce
2025-02-25 17:11:02 +00:00
Alex Galarce ac6f28bc44 Merged in hotfix/format-dates-yyyy-mm-dd (pull request #413)
Update date formatting in prompts to YYYY/MM/DD

* Update date formatting in prompts to YYYY/MM/DD

* fix tests for new date formatting


Approved-by: Katon Minhas
2025-02-25 00:30:06 +00:00
Katon Minhas a43f574239 Merged in hotfix/remove-print-statements (pull request #411)
Hotfix/remove print statements

* Remove print statements

* added llm_answer_raw

* prompt edit


Approved-by: Alex Galarce
2025-02-21 20:24:34 +00:00
Katon Minhas 81dfe7896b Merged in field/stop-loss (pull request #407)
StopLoss, Outliers, and Sequestration

* 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

* Bugfix

* Docstring

* Docstrings

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

* Merge branch 'bugfix/proc-code-lists' into bugfix/dynamic-assignment-issue

* Add outliers, stop-loss, and sequestration to reimbursement-level primary prompt template

* Add stop loss fields

* Add outlier fields

* Add sequestration fields

* Remove test

* Docstrings

* Update test for no default exhibit_level_answer_dict

* Merge branch 'bugfix/dynamic-assignment-issue' into field/stop-loss

* Merge branch 'main' into field/stop-loss

* Merged main into field/stop-loss


Approved-by: Alex Galarce
2025-02-21 19:55:12 +00:00
Katon Minhas b296cd187b Merged in bugfix/dynamic-assignment-issue (pull request #408)
Bugfix/dynamic assignment issue

* 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

* Bugfix

* Docstring

* Docstrings

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

* Merge branch 'bugfix/proc-code-lists' into bugfix/dynamic-assignment-issue

* Update test for no default exhibit_level_answer_dict

* Merged main into bugfix/dynamic-assignment-issue


Approved-by: Alex Galarce
2025-02-21 18:03:08 +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
Katon Minhas 87223cc3b8 Merged in field/initialize-prov-type (pull request #402)
Field/initialize prov type

* 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

* Service Breakout prompt template

* list bugfix

* Merged main into feature/proc-desc

* concurrency

* Merge branch 'feature/proc-desc' into field/initialize-prov-type

* Added service_breakout function - only contains aarete prov-type rn

* Merge branch 'main' into field/initialize-prov-type

* Docstring


Approved-by: Alex Galarce
2025-02-20 21:16:20 +00:00
Faizan Mohiuddin 6a0b820b88 Merged in client-runs-dashboard-updates (pull request #406)
Client runs dashboard updates

* new dashboard code

* dashboard updates

* Merged main into client-runs-dashboard-updates

* Merged main into client-runs-dashboard-updates


Approved-by: Alex Galarce
2025-02-20 20:49:52 +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
Alex Galarce dcde32e7af Merged in feature/test-bed-facilitation (pull request #404)
Feature/test bed facilitation for 1-1 fields

* start comparing output to label data

* Enhance load_test_files.py to merge and reorder labels and predictions, outputting to CSV

* Refactor load_test_files.py to streamline label and prediction loading, sorting, and CSV output for date and TIN/NPI fields

* rename to one_to_one_comparison

* Merged main into feature/test-bed-facilitation

* rename notebook_config

* Merge branch 'feature/test-bed-facilitation' of https://bitbucket.org/aarete/doczy.ai into feature/test-bed-facilitation

* Merged main into feature/test-bed-facilitation


Approved-by: Katon Minhas
2025-02-20 16:31:29 +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 a18d562d34 Merged in hotfix/fix-merge-when-no-reimb (pull request #401)
change join to outer so 1:1 merge works when no reimb

* change join to outer so 1:1 merge works when no reimb


Approved-by: Katon Minhas
2025-02-19 19:59:27 +00:00
Mayank Aamseek 9eb66c2c68 Merged in document_dates_optimization (pull request #397)
Document dates optimization

* simplified file processing for testing

* modified derived_term_date_prompt

* fixed day values with spaces or leading zeros

* modified contract termination date prompt

* updated termination date prompt

* reranking of chunks for better context

* exclude last date while calculating term date

* clean up

* clean up 2

* Merge branch 'main' into document_dates_optimization
pulled latest changes from main

* Merged main into document_dates_optimization

* fix unit tests

* Merged main into document_dates_optimization

* refactor: update termination date prompt for clarity and accuracy

* Merged main into document_dates_optimization

* fix pipeline

* Merge remote-tracking branch 'origin/main' into document_dates_optimization

* Merge branch 'document_dates_optimization' of https://bitbucket.org/aarete/doczy.ai into document_dates_optimization


Approved-by: Katon Minhas
2025-02-18 20:10:46 +00:00
Mayank Aamseek 4c98fcb230 Merged in feature/daip2-95 (pull request #396)
Feature/daip2 95

* testing carveout

* Merge branch 'main' into feature/daip2-95
pulled latest changes from main

* CONTRACT_DEFAULT_IND logic changed

* Merge branch 'main' into feature/daip2-95
pulled latest changes from main

* prompt updated to remove mention of last carveout

* Merged main into feature/daip2-95

* Merged main into feature/daip2-95

* prompt updated

* Merge branch 'feature/daip2-95' of https://bitbucket.org/aarete/doczy.ai into feature/daip2-95
latest changes pulled


Approved-by: Katon Minhas
2025-02-18 17:05:26 +00:00
Mayank Aamseek 722d8aa14a Merged in feature/daip2-101 (pull request #399)
Feature/daip2 101

* missing group tin fixed

* use tin prompt in full context when N/A

* fixed N/A TIN and applied same to NPI

* null tin fixed

* Merged main into feature/daip2-101

* if PROV_GROUP_TIN is still N/A, pick first value from tin_other

* Merge branch 'feature/daip2-101' of https://bitbucket.org/aarete/doczy.ai into feature/daip2-101
pulled latest changes from main


Approved-by: Katon Minhas
2025-02-17 19:43:55 +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
Alex Galarce 4f363156e7 Merged in feature/new-prompts-for-methodology (pull request #395)
Feature/new prompts for methodology

* Added reimb. effective date and termination date

* Added prompt for identifying 'not to exceed' limitations in investment prompts

* Refactor field names for reimbursement effective and termination dates in investment prompts

* Clarified documentation for handling multiple reimbursement methods in investment prompts


Approved-by: Katon Minhas
2025-02-14 14:48:57 +00:00
Katon Minhas fdd002c37e Merged in feature/code-ranges (pull request #394)
code + reimbursement method fixes

* code + reimbursement method fixes


Approved-by: Alex Galarce
2025-02-13 17:52:00 +00:00
Katon Minhas 7724a7ddc4 Merged in hotfix/pipeline-fix (pull request #393)
Draft: update unit tests

* update unit tests

* Update unit tests

* Update unit tests


Approved-by: Alex Galarce
2025-02-12 18:59:59 +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 38f8fd7cae Merged in field/bill-type-cd (pull request #391)
Add Bill Type

* Add Bill Type


Approved-by: Alex Galarce
2025-02-11 19:18:47 +00:00
Katon Minhas d442ec275a Merged in field-group/code-primary (pull request #389)
Field group/code primary

* Code breakout function

* Merged main into field-group/code-primary

* Update prompts

* Add admit type

* Merged main into field-group/code-primary

* Updated code primary prompts

* Updated code primary prompt template


Approved-by: Alex Galarce
2025-02-11 15:40:55 +00:00
Alex Galarce 524968f09f Merged in bugfix/exhibit-page-fix-pipeline (pull request #390)
Bugfix/exhibit page fix pipeline

* Fix broken get_exhibit_pages tests

* Add __repr__ method to FieldSet for better string representation


Approved-by: Katon Minhas
2025-02-10 22:59:10 +00:00
Alex Galarce d243f35c63 Merged in bugfix/force-first-page-as-exhibit (pull request #388)
Force first page inclusion in get_exhibit_pages

* Add first page inclusion to exhibit pages in get_exhibit_pages function


Approved-by: Katon Minhas
2025-02-10 20:11:03 +00:00
Mayank Aamseek eea6b6d0c1 Merged in feature/daip2-101 (pull request #387)
Feature/daip2 101

* missing group tin fixed

* use tin prompt in full context when N/A

* fixed N/A TIN and applied same to NPI

* Merge remote-tracking branch 'origin/main' into feature/daip2-101


Approved-by: Alex Galarce
2025-02-10 15:55:40 +00:00
Katon Minhas 91a71643dc Merged in field/prod_prog_lob (pull request #386)
Updated crosswalks

* Updated crosswalks

* Merged main into field/prod_prog_lob

* Update CONTRACT_PRODUCT prompt


Approved-by: Alex Galarce
2025-02-07 21:58:02 +00:00
Mayank Aamseek 8533d3cf78 Merged in feature/daip2-101 (pull request #384)
DRAFT: missing group tin fixed

* missing group tin fixed

* use tin prompt in full context when N/A

* Merged main into feature/daip2-101


Approved-by: Katon Minhas
2025-02-07 20:13:41 +00:00
Katon Minhas 419ee297c2 Merged in field/aarete_derived_network (pull request #383)
Initialize AARETE_DERIVED_NETWORK

* Initialized AARETE_DERIVED_NETWORK

* Updated crosswalk - make all crosswalks capitalized

* Merge branch 'main' into field/aarete_derived_network

* Merged main into field/aarete_derived_network

* Merged main into field/aarete_derived_network


Approved-by: Alex Galarce
2025-02-06 18:35:26 +00:00
Alex Galarce a59562950f Merged in test/check-doc-dates-against-test-bed (pull request #385)
Better visibility and testing functionality for optimizing prompts

* first commit

* Enhance prompts and processing for contract termination dates

- Updated prompt to include 'year to year' as a valid example output.
- Implemented case-insensitive processing for contract text and field keywords for smart chunking.
- Clarified prompt for derived termination date to specify it is exclusive of renewals

* Merge remote-tracking branch 'origin/main' into test/check-doc-dates-against-test-bed

* Update termination date prompt tests

* Refine keywords for contract termination date prompt in investment prompts

* Docs on using the testing notebook

* add 'input_files' option to test_params

* Merge remote-tracking branch 'origin/main' into test/check-doc-dates-against-test-bed

* comment out debug line

* refactor: adjust input_files filtering logic in main function


Approved-by: Katon Minhas
2025-02-06 18:26:56 +00:00
Katon Minhas 49b2d57bb4 Merged in field/default-ind (pull request #381)
Field/default ind

* Initialized Default Ind

* Add docstring

* Merged main into field/default-ind


Approved-by: Alex Galarce
2025-02-05 22:09:57 +00:00
Katon Minhas 72c3150089 Merged in field-group/methodology-breakout (pull request #382)
Initialized Field group/methodology breakout

* Added fee schedule breakout

* Only run standard methodology breakout on non-carveouts

* Add docstrings


Approved-by: Alex Galarce
2025-02-05 22:05:20 +00:00