Commit Graph

1352 Commits

Author SHA1 Message Date
Alex Galarce 32d431ec4e Merged in feature/remove-exhibit-filtering (pull request #565)
strip out reimbursement exhibit identification

* strip out reimbursement exhibit identification


Approved-by: Katon Minhas
2025-06-09 21:35:20 +00:00
Mayank Aamseek 0d3a110e26 Merged in hotfix/methodology_breakout_issue_fixes (pull request #562)
Hotfix/methodology breakout issue fixes

* additional values in unit of measure removed

* Merge branch 'main' into hotfix/methodology_breakout_issue_fixes

* added valid list of unit of measure

* Merge branch 'main' into hotfix/methodology_breakout_issue_fixes


Approved-by: Katon Minhas
2025-06-09 13:04:21 +00:00
Katon Minhas f7c41326d3 Merged in feature/update-dynamic-mappings (pull request #561)
Update mappings

* Initial commit - update mappings

* Update product mapping


Approved-by: Alex Galarce
2025-06-06 18:37:36 +00:00
Katon Minhas e5d5c71781 Merged in feature/selective-reimb-prov-info (pull request #558)
Update reimb tin-npi-name passing to reimbursement primary

* Update reimb tin-npi-name passing to reimbursement primary

* Refactor reimbursement_tin_npi to streamline provider value extraction and improve handling of empty values


Approved-by: Alex Galarce
2025-06-05 18:37:25 +00:00
Alex Galarce 3be2f44cb1 Merged in feature/global-lesser-of (pull request #553)
Feature/global lesser of

* Merge remote-tracking branch 'origin/feature/reimb-primary-updates'

* First try at global "lesser of"

* Generate reimb_ids further upstream

* Implement global lesser of injection and extraction logic in file processing

* Update logic to change LESSER_OF_IND in-place for global affected rows; add docstrings

* Refactor global lesser of injection logic to create new rows for REIMB_IDs lacking lesser of logic; update original rows in place and improve tracking flags.

* Merge remote-tracking branch 'origin/main' into feature/global-lesser-of

* Add logging for global lesser of logic injection and update handling of original rows

* Refactor global lesser of logic: move functions to one_to_one_funcs.py and update inject_global_lesser_of_rows to use new implementations

* Move imports for METHODOLOGY_BREAKOUT_QUESTIONS and REIMB_TERM_BREAKOUT to the top of one_to_one_funcs.py for better organization and to remove prototype comments.

* isort

* Refactor import statement for generate_reimb_ids to use the full module path for clarity

* load field from JSON instead of hardcoded values

* Update logging levels in investment_field_testing notebook

* Merged main into feature/global-lesser-of

* Remove unnecessary comment from investment_postprocessing_funcs import statement for clarity

* Merge branch 'feature/global-lesser-of' of https://bitbucket.org/aarete/doczy.ai into feature/global-lesser-of

* Merge remote-tracking branch 'origin/main' into feature/global-lesser-of

* Remove debug print statement from process_file function

* fix call to Field.load_from_file

* Merge remote-tracking branch 'origin/main' into feature/global-lesser-of

* Add tracking flag for global lesser of logic when none is found

* explicitly sort by FILE_NAME, EXHIBIT_PAGE, and REIMB_LESSER_OF_ID columns

* Add new field type, "full_context_separate", to make sure that we don't run it twice.  Also formatting fix

* Fix iteration over separate fields in run_full_context_fields function


Approved-by: Katon Minhas
2025-06-04 19:49:10 +00:00
Katon Minhas b59154cfd9 Merged in hotfix/preprocessing-error (pull request #556)
Bugfix

* Bugfix


Approved-by: Alex Galarce
2025-06-03 22:11:10 +00:00
Katon Minhas ca01d49452 Merged in bugfix/dropped-pages (pull request #554)
Bugfix/dropped pages

* Rearrange

* Update table preprocessing

* Remove print

* Remove page start

* test for table issue

* Merged main into bugfix/dropped-pages

* prints and documentation

* Pipeline fix

* remove get_pages_to_process


Approved-by: Alex Galarce
2025-06-03 20:47:42 +00:00
Mayank Aamseek 28ab4b5d93 Merged in initialize-conversion-factor (pull request #552)
Initialize conversion factor

* REIMB_CONVERSION_FACTOR prompt added

* Merge branch 'main' into initialize-conversion-factor

* Merge branch 'main' into initialize-conversion-factor

* conversion factor fixed

* prompt fix for conversion factor

* Merge branch 'main' into initialize-conversion-factor

* prompts updated for REIMB_FEE_RATE and AARETE_DERIVED_REIMB_METHOD

* Merged main into initialize-conversion-factor

* prompt fix

* Merge branch 'initialize-conversion-factor' of https://bitbucket.org/aarete/doczy.ai into initialize-conversion-factor


Approved-by: Katon Minhas
2025-06-03 15:58:50 +00:00
VenkataKrishna Reddy Avula 99f08796fb Merged in bugfix/lesser_of_ind (pull request #551)
bugfix/lesser_of_ind to main

* updated lesser_of_ind prompt

* Merged main into bugfix/lesser_of_ind


Approved-by: Katon Minhas
2025-06-03 15:05:36 +00:00
VenkataKrishna Reddy Avula 4c1b85a2e8 Merged in bugfix/reimb_pct_rate (pull request #548)
fixed reimb_pct_rate empty values

* fixed reimb_pct_rate empty values

* updated lesser of prompt

* rolled back lesser_of_ind prompt

* updated REIMB_PCT_RATE prompt

* updated fill_empty_reimb_pct_rate

* fixed Value Error

* Merged main into bugfix/reimb_pct_rate


Approved-by: Katon Minhas
2025-06-03 13:50:46 +00:00
VenkataKrishna Reddy Avula e096d03fba Merged in bugfix/effective_date (pull request #550)
Bugfix/effective_date to main

* fixed string page numbers issue


Approved-by: Katon Minhas
2025-06-02 13:04:52 +00:00
Alex Galarce 780dac2ec1 Merged in feature/fuzzy-match-no-numbers (pull request #549)
Feature/fuzzy match no numbers

* Add fuzzy matching function for string comparison and enhance term extraction result evaluation

* Enhance term extraction results evaluation by adding counts and readable strings for matched, false negatives, and false positives

* Adjust text similarity threshold to 65 and improve readability of comparison results in term extraction evaluation

* Merged main into feature/fuzzy-match-no-numbers


Approved-by: Katon Minhas
2025-05-30 15:10:19 +00:00
Alex Galarce 806c272dc5 Merged in feature/further-reimb-primary-improvements (pull request #546)
Feature/further reimb primary improvements

* Refactor identify_reimbursement_exhibits to return both EXPLICIT and IMPLICIT values

* Moving from # Debugging lines to `logger`

* Enhance "lesser of" and exception language instructions in reimbursement terms

* clarify unclear print/logging statements

* Replace debugging print statements with logging in get_reimbursement_primary function

* Add logging for page processing in run_one_to_n_prompts function


Approved-by: Katon Minhas
2025-05-29 22:33:12 +00:00
Alex Galarce 9db0fb328e Merged in bugfix/identify-tables (pull request #544)
Don't consider table-subpages each individually for reimbursement exhibit identification

* Refine EXHIBIT_CHECK prompt

* test: rework `get_exhibit_pages` for table subpages

* Fix indentation

* Experimental table de-chunking

* Increase max_tokens for Claude model in exhibit page processing

* fix get_pages_to_process docstring

* refactor: improved docstring for get_exhibit_pages

* move `get_pages_to_process` to `preprocess.py`

* test: add unit tests for get_pages_to_process function

* Comment out debugging lines

* Changed prompt that was breading universal_json_load parsing

* fix: handle "no results" case in get_reimbursement_primary function

* fixed docstring


Approved-by: Katon Minhas
2025-05-28 16:57:23 +00:00
Katon Minhas 7a44c8575d Merged in bugfix/remaining-dynamic-issues (pull request #543)
Bugfix/remaining dynamic issues

* Add Care1st-->Medicaid mapping for Centene

* Streamlined fill_na_mapping

* Update prompt for reimbursement-level dynamic fields - remove unknown

* Merge branch 'main' into bugfix/remaining-dynamic-issues

* Remove test


Approved-by: Alex Galarce
2025-05-22 19:53:15 +00:00
Mayank Aamseek f9b88959c3 Merged in feature/daip2-193 (pull request #532)
payemnt carveout added

* payemnt carveout added

* Merge branch 'main' into feature/daip2-193

* refined PAYMENT_CARVEOUT related prompts

* Merge branch 'main' into feature/daip2-193

* notebook updated

* notebook updated

* Merge branch 'main' into feature/daip2-193

* carveout blank values and default ind corrected

* print statement removed

* field_type changed for default_ind

* payment_carveout description updated to add code

* duplicate run of get_methodology_breakout fixed

* pipeline error fixed

* pipeline error fixed

* Merge branch 'main' into feature/daip2-193

* updated AARETE_DERIVED_REIMB_METHOD prompt

* default_term prompt changed

* refined copilot checked AARETE_DERIVED_REIMB_METHOD prompt

* Merge branch 'main' into feature/daip2-193

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

* spelling error fixed

* Merged main into feature/daip2-193


Approved-by: Alex Galarce
2025-05-22 19:19:19 +00:00
Alex Galarce cacb79edea Merged in hotfix/bug-in-test-reimb-primary (pull request #542)
fix bug in argument order for test.py

* fix bug in argument order


Approved-by: Katon Minhas
2025-05-22 16:29:59 +00:00
Alex Galarce da174ceefa Merged in feature/default-term-new-prompt (pull request #539)
default term new prompt and de-duplication before Methodology Breakout

* Refine prompts for default indicator methodology and enhance instructions for final reimbursement methodology output

* Enhance DEFAULT_INDICATOR prompt to clarify its role as a fallback reimbursement method

* Implement service-reimb tracking to prevent duplicates

* Refactor methodology breakout processing to reduce code duplication and improve clarity

* Remove debugging print statements and improve item ID formatting in reimbursement processing

* Merge remote-tracking branch 'origin/main' into feature/default-term-new-prompt

* Refactor methodology breakout processing to remove duplicate tracking and simplify logic

* Merged main into feature/default-term-new-prompt

* Merged main into feature/default-term-new-prompt

* rename _process_answer_dict to _process_carveout_or_breakout


Approved-by: Katon Minhas
2025-05-22 15:39:03 +00:00
Katon Minhas 098c10b9ca Merged in bugfix/dynamic-primary-issues (pull request #541)
Bugfix/dynamic primary issues

* Update reimbursement exhibit detection

* Remove prints

* Update prompt

* Decrease header size

* Prompt update - only return dynamic 1:1 values if applied to entire contract

* Testing

* pipe-delimited

* Merged main into bugfix/dynamic-primary-issues

* Fix Product->LOB mapping

* Remove test

* remove commented crosswalk code

* Remove print


Approved-by: Alex Galarce
2025-05-22 15:04:19 +00:00
Katon Minhas 282d4fa6ed Merged in feature/testbed-mods (pull request #540)
Feature/testbed mods

* Initial commit - handle TN for prov info

* one-to-one fix for prec rec acc

* Update calculation

* update tests

* Update calculation

* one-to-one comparison updates

* Testbed metrics script improvements

* Update output format


Approved-by: Alex Galarce
2025-05-21 19:26:06 +00:00
Katon Minhas 597d28045b Merged in feature/implicit-proc-mapping (pull request #531)
Feature/implicit proc mapping

* Testing scripts

* Refactor code primary

* implicit draft

* Merge branch 'main' into feature/implicit-proc-mapping

* Prompt update

* Prompt changes

* Experiments with preprocessing

* code updates

* Merged main into feature/implicit-proc-mapping

* Add condition to avoid Covered Services

* Add functions to main script

* remove explanations

* Error handling

* Genericize prompt

* Final prompt updates

* remove test file

* prep for merge

* Merged main into feature/implicit-proc-mapping

* Merged main into feature/implicit-proc-mapping


Approved-by: Alex Galarce
2025-05-19 20:26:24 +00:00
Katon Minhas e510e8f6c2 Merged in feature/product-mapping (pull request #519)
Feature/product mapping

* Initialize product-lob mapping

* Update Products for Moda

* Add valid products to the prompt

* Update fill_na_mapping

* E2E test passed

* Update product-lob mapping

* Merged main into feature/product-mapping

* Merged main into feature/product-mapping

* Add product mappings

* update mappings

* Add Healthy Families Benefit Program --> CHIP mapping

* Merged main into feature/product-mapping

* Merged main into feature/product-mapping

* Blank products

* Ready for merge

* Merged main into feature/product-mapping

* Merged main into feature/product-mapping


Approved-by: Alex Galarce
2025-05-19 20:04:59 +00:00
Katon Minhas 08bba13c07 Merged in feature/update-mappings (pull request #537)
Update program mappings

* Update program mappings

* Merged main into feature/update-mappings


Approved-by: Alex Galarce
2025-05-19 18:19:29 +00:00
Alex Galarce de6004bbd1 Merged in feature/mb-prompt-and-testbed-cleanup (pull request #536)
Refactor methodology breakout prompt, small testbed cleanup

* Refactor REIMB_TERM_BREAKOUT prompt.  Include service AND methodology.  Change to sections formatting.

* rename some columns in `Reimbursement Primary` tab of test output


Approved-by: Katon Minhas
2025-05-19 18:18:49 +00:00
Alex Galarce 97dad37ba0 Merged in feature/no-longer-concat-names (pull request #535)
Feature/no longer concat names

* Simplify deduplication logic for no AKAs

* Add unit tests

* Merge remote-tracking branch 'origin/main' into feature/no-longer-concat-names


Approved-by: Katon Minhas
2025-05-16 21:17:38 +00:00
Mayank Aamseek 4d48c4c63e Merged in feature/daip-219 (pull request #525)
standardized AARETE_DERIVED_FEE_SCHEDULE, removed Unit of Measure as Encounter, fix where conversion factor is captured as fee rate

* standardized AARETE_DERIVED_FEE_SCHEDULE, removed Unit of Measuer as Encounter, fix where conversion factor is captured as fee rate

* REIMB_FEE_RATE prompt updated

* updated derived fee schedule values

* updated derived fee schedule version prompt

* Merge branch 'main' into feature/daip-219

* update REIMB_PCT_RATE prompt

* Merged main into feature/daip-219

* Merged main into feature/daip-219

* Update all-caps

* Update capitalization


Approved-by: Katon Minhas
2025-05-16 16:33:57 +00:00
Mayank Aamseek a89c346ca3 Merged in bugfix/smart-chunking (pull request #527)
find_overlap function added to handle inconsistent chunk size

* find_overlap function added to handle inconsistent chunk size

* set min chunk overlap needed to remove overlap to 3

* Merge branch 'main' into bugfix/smart-chunking

* pipeline error fixed

* Merge branch 'main' into bugfix/smart-chunking

* spelling fix


Approved-by: Katon Minhas
2025-05-15 19:51:19 +00:00
Alex Galarce 8beaf61a65 Merged in feature/explore-methodology-primary (pull request #530)
Methodology Primary - New Prompt and Test Bed Utilities

* Add IDENTIFY_REIMBURSEMENT_EXHIBITS function to analyze exhibit headers for reimbursement information

* Add Zone.Identifier to .gitignore to prevent Windows zone information files from being tracked

* Add functionality to identify reimbursement exhibits

* Add functionality to identify reimbursement exhibits in run_one_to_n_prompts

* Output YAML parsing

* Refactor identify_reimbursement_exhibits to improve YAML parsing and error handling

* New reimbursement exhibit logic

* Update IDENTIFY_REIMBURSEMENT_EXHIBITS_PROMPT to return PAGE NUMBERS instead of exhibit headers

* Fix identify_reimbursement_exhibits to return page numbers as strings after YAML parsing

* Remove debugging print statement for reimbursement exhibits in run_one_to_n_prompts

* Remove commented debugging print statements in identify_reimbursement_exhibits

* Increase read_timeout in EC2 configuration from 2000 to 4000

* Merge remote-tracking branch 'origin/main' into feature/reimb-primary-improvements

* Remove debugging print statements in get_reimbursement_primary function

* mypy error

* Fix return type in identify_reimbursement_exhibits to ensure keys are returned as a list

* Merge remote-tracking branch 'origin/main' into feature/reimb-primary-improvements

* Refactor REIMBURSEMENT_LEVEL_PRIMARY prompt

* Merge remote-tracking branch 'origin/main' into feature/explore-methodology-primary

* Rename and document row comparison function

* Merge remote-tracking branch 'origin/main' into feature/explore-methodology-primary

* Add reimbursement primary analysis and comparison function to testbed

* Enhance reimbursement exhibit identification prompt with explicit and implicit indicators

* Rename ground truth count and pairs in term extraction results for clarity

* shorten methdology_primary_row_comparison notebook


Approved-by: Katon Minhas
2025-05-14 20:44:22 +00:00
Katon Minhas 5105b4048e Merged in feature/testbed-row-check (pull request #528)
Feature/testbed row check

* Update for row count

* Split one-to-n for different output by field type


Approved-by: Alex Galarce
2025-05-14 16:43:09 +00:00
Alex Galarce 55fa4f2e79 Merged in feature/reimb-primary-improvements (pull request #524)
Reimbursement Exhibit Prefiltering

* Add IDENTIFY_REIMBURSEMENT_EXHIBITS function to analyze exhibit headers for reimbursement information

* Add Zone.Identifier to .gitignore to prevent Windows zone information files from being tracked

* Add functionality to identify reimbursement exhibits

* Add functionality to identify reimbursement exhibits in run_one_to_n_prompts

* Output YAML parsing

* Refactor identify_reimbursement_exhibits to improve YAML parsing and error handling

* New reimbursement exhibit logic

* Update IDENTIFY_REIMBURSEMENT_EXHIBITS_PROMPT to return PAGE NUMBERS instead of exhibit headers

* Fix identify_reimbursement_exhibits to return page numbers as strings after YAML parsing

* Remove debugging print statement for reimbursement exhibits in run_one_to_n_prompts

* Remove commented debugging print statements in identify_reimbursement_exhibits

* Increase read_timeout in EC2 configuration from 2000 to 4000

* Merge remote-tracking branch 'origin/main' into feature/reimb-primary-improvements

* Remove debugging print statements in get_reimbursement_primary function

* mypy error

* Fix return type in identify_reimbursement_exhibits to ensure keys are returned as a list

* Merge remote-tracking branch 'origin/main' into feature/reimb-primary-improvements


Approved-by: Katon Minhas
2025-05-13 20:22:43 +00:00
Alex Galarce 384b3c5d31 Merged in feature/apply-postprocessing-to-test-bed (pull request #526)
Refactor CPT postprocessing, create notebook to postprocess test bed for MCS team

* Move comment

* Implement testbed postprocessing functions

* Refactor normalize CPT postprocessing

* remove old notebook, add new postprocess notebook

* Enhance normalize_cpt_fields to handle comma-separated values in lists

* Update normalize_cpt_fields to return an empty string for None values

* Add testbed postprocessing script, removed notebook


Approved-by: Katon Minhas
2025-05-13 16:58:27 +00:00
Mayank Aamseek cfcc5488e4 Merged in feature/daip-217 (pull request #517)
removed unwanted aarete_derived reimb method

* removed unwanted aarete_derived reimb method

* Merge branch 'main' into feature/daip-217

* business rules implemented for reimb_method

* Merge branch 'main' into feature/daip-217

* limt possible values for reimb_method

* reimb_method prompt updated

* Merged main into feature/daip-217


Approved-by: Alex Galarce
Approved-by: Katon Minhas
2025-05-12 18:48:00 +00:00
Alex Galarce 6bc345ef9e Merged in tin-npi-acc-testing (pull request #516)
Update testbed data sources and enhance metric calculations for blank fields

* Update testbed data sources and enhance metric calculations for blank fields

* Add order-independent provider analysis

* add tin-npi normalization and verbose

* Enhance provider field evaluation by excluding "UNKNOWN" and "NO_IDENTIFIERS_FOUND" values

* List-based method

* Enhance provider field evaluation by incorporating frequency-based metrics and excluding "UNKNOWN" values

* Fix splits

* fix headers

* fix comma splitting

* Merged main into tin-npi-acc-testing

* Merged main into tin-npi-acc-testing

* Refine provider metrics logging to exclude empty predicted values

* Merge branch 'tin-npi-acc-testing' of https://bitbucket.org/aarete/doczy.ai into tin-npi-acc-testing

* Merged main into tin-npi-acc-testing

* last commit before changing back to sets

* Refactor evaluation metrics calculation to use set operations (while still displaying counters for info)

* Merge branch 'tin-npi-acc-testing' of https://bitbucket.org/aarete/doczy.ai into tin-npi-acc-testing


Approved-by: Katon Minhas
2025-05-12 18:23:50 +00:00
Alex Galarce 147f91eaa9 Merged in bugfix/inconsistent_table_sequences (pull request #523)
Bugfix/inconsistent table sequences

* changes for inconsistent table sequence

* Added code comment block

* Merged main into bugfix/inconsistent_table_sequences

* Merged main into bugfix/inconsistent_table_sequences

* Merged main into bugfix/inconsistent_table_sequences

* Merged main into bugfix/inconsistent_table_sequences


Approved-by: Katon Minhas
2025-05-08 17:18:47 +00:00
Katon Minhas e51b599925 Merged in feature/medicare-medicaid-postprocess (pull request #521)
Feature/medicare medicaid postprocess

* Initial test

* add to postprocessing funcs

* Remove from postprocessing

* Merged main into feature/medicare-medicaid-postprocess


Approved-by: Alex Galarce
2025-05-07 23:03:16 +00:00
Alex Galarce cbd7c9c7d0 Merged in bugfix/add_name_to_full_context_if_no_identifiers (pull request #520)
Bugfix/add name to full context if no identifiers

* Add handling for missing TIN/NPI identifiers in one-to-one results

* Update provider name handling in one-to-one results for group providers


Approved-by: Katon Minhas
2025-05-07 22:53:27 +00:00
VenkataKrishna Reddy Avula 0d6bdf9539 Merged in bugfix/effective_date_fix (pull request #504)
DRAFT: Bugfix/effective date fix

* Merged in bugfix/extra-fields (pull request #500)

Do not run Exhibit level prompt if there are no exhibit level fields

* Do not run Exhibit level prompt if there are no exhibit level fields

* Update dynamic test

* Remove test from one-to-n test module

* Update test

* Fix unit test


Approved-by: Alex Galarce

* Merged in bugfix/tin-npi-prompt-fixes (pull request #499)

Bugfix/tin npi prompt fixes

* Change delimiter for other provider information from comma to pipe

* filter out invalid providers

* Update extraction and formatting instructions for provider entities in TIN_NPI_TEMPLATE

* Merged main into bugfix/tin-npi-small-bugfixes

* Refactor deduplication logic to use string_utils for checking empty provider fields

* Merge branch 'bugfix/tin-npi-small-bugfixes' of https://bitbucket.org/aarete/doczy.ai into bugfix/tin-npi-small-bugfixes

* Update deduplication logic to exclude providers with 'UNKNOWN' TIN, NPI, or NAME

* Merge remote-tracking branch 'origin/main' into bugfix/tin-npi-small-bugfixes

* Fix deduplication logic to not drop subsequent names

* Fix formatting of provider names in deduplication logic

* add payer name filtering

* reorder execution order to allow to find payer_name first

* Add handling for previously unfound group providers in identify_group_provider function

* Merge remote-trackin…
* Merged in feature/update-testbed-script (pull request #501)

Feature/update testbed script

* Update preprocessing

* Update preprocessing

* remove quit

* Update date for filename

* Merged main into feature/update-testbed-script


Approved-by: Alex Galarce

* Merged in bugfix/smart-chunks (pull request #503)

missing of text in chunks fixed

* missing of text in chunks fixed


Approved-by: Katon Minhas

* Merged in feature/rework-reimb-tin-npi (pull request #502)

Feature/rework reimb tin npi

* use LLM for reimb_[tin/npi/name]

* Merge remote-tracking branch 'origin/main' into feature/rework-reimb-tin-npi

* Merge remote-tracking branch 'origin/main' into feature/rework-reimb-tin-npi

* deduplicate tin/name/npi before adding to prompt

* Pull out prompt and llm_response in methodology_breakout_single_row for easier debugging

* Refactor reimbursement_tin_npi to handle multiple providers and update valid TIN, NPI, and NAME fields accordingly

* Reorder REIMB_PROV_NAME field in investment_prompts.json

* Update REIMB_PROV_NAME prompt to specify valid values for provider names

* Remove valid_values constraint from prov_name to raise accuracy

* Remove debugging print statements from reimbursement_tin_npi and related functions

* Remove debugging print statements from run_provider_info_fields function

* Merge remote-tracking branch 'origin/main' into feature/rework-reimb-tin-npi

* Remove debugging print statem…
* Merged in feature/preformat-single-quotes-input (pull request #506)

Replace double quotes with single quotes in context strings for parsability

* Replace double quotes with single quotes in context strings for parsability

* Merged main into feature/preformat-single-quotes-input


Approved-by: Katon Minhas

* updated sig pages fnxn

* Merge branch 'main' into bugfix/effective_date_fix

* poetry add pymupdf

* created vision funcs

* Merged main into bugfix/effective_date_fix

* fixed pipeline issue

* updated string_utils_test

* updated test values

* updated extract signature page fxn

* updated test values

* updated test values

* Merged main into bugfix/effective_date_fix

* Prompt template in all-caps

* remove debugging prints

* Merged main into bugfix/effective_date_fix

* Change vision to False by default

* Change vision to False by default

* fix tests

* fix tests


Approved-by: Katon Minhas
2025-05-07 18:21:09 +00:00
Katon Minhas 806bd9b3bb Merged in bugfix/exhibit-header-detection (pull request #518)
Bugfix/exhibit header detection

* set up testing

* Increased context length, changed prompt to investment_prompts from preprocessing_prompts

* extracting the header

* minor changes

* Merged main into bugfix/exhibit-header-detection

* cleanup prints and tests


Approved-by: Alex Galarce
2025-05-07 16:18:02 +00:00
Katon Minhas 0bf14b5182 Merged in bugfix/dynamic-mapping (pull request #515)
Bugfix/dynamic mapping

* Add AARETE_DERIVED_PRODUCT

* Update mappings

* Update mappings

* Remove print statements and test file


Approved-by: Alex Galarce
2025-05-06 17:50:12 +00:00
Alex Galarce fd43f928dd Merged in feature/prov-info-testbed-to-json (pull request #514)
Add function to group provider information into JSON array format post-hoc from the test bed

* Add function to group provider information into JSON array format

* Add example notebook


Approved-by: Katon Minhas
2025-05-05 21:53:04 +00:00
Alex Galarce e7e05f5107 Merged in bugfix/tin-npi-delimiter (pull request #513)
Update prompts to use pipes (|) for multiple TINs, NPIs, and provider names instead of commas

* Update prompts to use pipes (|) for multiple TINs, NPIs, and provider names instead of commas

* Merge remote-tracking branch 'origin/main' into bugfix/tin-npi-delimiter


Approved-by: Katon Minhas
2025-05-05 21:13:14 +00:00
Katon Minhas 577f370f47 Merged in field/claim-type-1N (pull request #512)
Remove CLAIM_TYPE from one-to-one

* Remove CLAIM_TYPE from one-to-one


Approved-by: Alex Galarce
2025-05-05 18:54:40 +00:00
Katon Minhas 4992c315d8 Merged in issuefix/health-insurance-exchange-issue (pull request #505)
Add Commercial-Exchange mapping

* Add Commercial-Exchange mapping

* Merged main into issuefix/health-insurance-exchange-issue


Approved-by: Alex Galarce
2025-05-05 12:53:37 +00:00
Alex Galarce afda739bac Merged in feature/preformat-single-quotes-input (pull request #506)
Replace double quotes with single quotes in context strings for parsability

* Replace double quotes with single quotes in context strings for parsability

* Merged main into feature/preformat-single-quotes-input


Approved-by: Katon Minhas
2025-05-02 20:24:12 +00:00
Alex Galarce 4191a5616e Merged in feature/rework-reimb-tin-npi (pull request #502)
Feature/rework reimb tin npi

* use LLM for reimb_[tin/npi/name]

* Merge remote-tracking branch 'origin/main' into feature/rework-reimb-tin-npi

* Merge remote-tracking branch 'origin/main' into feature/rework-reimb-tin-npi

* deduplicate tin/name/npi before adding to prompt

* Pull out prompt and llm_response in methodology_breakout_single_row for easier debugging

* Refactor reimbursement_tin_npi to handle multiple providers and update valid TIN, NPI, and NAME fields accordingly

* Reorder REIMB_PROV_NAME field in investment_prompts.json

* Update REIMB_PROV_NAME prompt to specify valid values for provider names

* Remove valid_values constraint from prov_name to raise accuracy

* Remove debugging print statements from reimbursement_tin_npi and related functions

* Remove debugging print statements from run_provider_info_fields function

* Merge remote-tracking branch 'origin/main' into feature/rework-reimb-tin-npi

* Remove debugging print statements from get_reimbursement_primary function

* Merge remote-tracking branch 'origin/main' into feature/rework-reimb-tin-npi

* Refactor reimbursement_tin_npi to always add providers (when we have any) to reimbursement_level_fields


Approved-by: Katon Minhas
2025-05-02 20:13:02 +00:00
Mayank Aamseek b0775ef23b Merged in bugfix/smart-chunks (pull request #503)
missing of text in chunks fixed

* missing of text in chunks fixed


Approved-by: Katon Minhas
2025-05-02 16:29:15 +00:00
Katon Minhas ff33f211bc Merged in feature/update-testbed-script (pull request #501)
Feature/update testbed script

* Update preprocessing

* Update preprocessing

* remove quit

* Update date for filename

* Merged main into feature/update-testbed-script


Approved-by: Alex Galarce
2025-05-01 21:47:01 +00:00
Alex Galarce 9763ff47cc Merged in bugfix/tin-npi-prompt-fixes (pull request #499)
Bugfix/tin npi prompt fixes

* Change delimiter for other provider information from comma to pipe

* filter out invalid providers

* Update extraction and formatting instructions for provider entities in TIN_NPI_TEMPLATE

* Merged main into bugfix/tin-npi-small-bugfixes

* Refactor deduplication logic to use string_utils for checking empty provider fields

* Merge branch 'bugfix/tin-npi-small-bugfixes' of https://bitbucket.org/aarete/doczy.ai into bugfix/tin-npi-small-bugfixes

* Update deduplication logic to exclude providers with 'UNKNOWN' TIN, NPI, or NAME

* Merge remote-tracking branch 'origin/main' into bugfix/tin-npi-small-bugfixes

* Fix deduplication logic to not drop subsequent names

* Fix formatting of provider names in deduplication logic

* add payer name filtering

* reorder execution order to allow to find payer_name first

* Add handling for previously unfound group providers in identify_group_provider function

* Merge remote-tracking branch 'origin/main' into bugfix/tin-npi-prompt-fixes

* Remove debugging print statements from provider info and group provider identification functions

* Refactor provider info processing to remove unused payer_name parameter and adjust execution order for clarity

* add debug lines

* Clarify instructions in TIN_NPI_TEMPLATE and GROUP_TIN_NPI_TEMPLATE for extracting provider entities, emphasizing the distinction between providers and payers, and adding identification indicators for main contracting groups.

* Merge remote-tracking branch 'origin/main' into bugfix/tin-npi-prompt-fixes

* Remove debugging print statements from run_provider_info_fields function


Approved-by: Katon Minhas
2025-05-01 01:12:20 +00:00
Katon Minhas 46a05df02e Merged in bugfix/extra-fields (pull request #500)
Do not run Exhibit level prompt if there are no exhibit level fields

* Do not run Exhibit level prompt if there are no exhibit level fields

* Update dynamic test

* Remove test from one-to-n test module

* Update test

* Fix unit test


Approved-by: Alex Galarce
2025-04-30 20:35:53 +00:00
Katon Minhas 45d97cea88 Merged in feature/update-dynamic-valid (pull request #498)
update program mappings

* update program mappings


Approved-by: Alex Galarce
2025-04-29 21:48:39 +00:00