Commit Graph

238 Commits

Author SHA1 Message Date
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
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
Alex Galarce 327633b57a Merged in bugfix/tin-npi-small-bugfixes (pull request #495)
Bugfix/tin npi small bugfixes

* 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


Approved-by: Katon Minhas
2025-04-29 15:46:32 +00:00
Mayank Aamseek f9fd902760 Merged in feature/aarete_derived_amend_no (pull request #496)
aarete_derived_amendment_num column added

* aarete_derived_amendment_num column added

* Merged main into feature/aarete_derived_amend_no


Approved-by: Katon Minhas
2025-04-29 15:03:01 +00:00
Katon Minhas 9984d046d0 Merged in feature/full-test-script (pull request #497)
Initial commit - single testbed comparison script

* Initial commit - single testbed comparison script


Approved-by: Alex Galarce
2025-04-29 15:00:38 +00:00
Alex Galarce 0939399f0e Merged in bugfix/up-tokens-and-json-parse-logging (pull request #493)
Bugfix/up tokens and json parse logging

* Increase max_tokens limit for get_reimbursement_primary

* print entire problematic input in universal_json_load


Approved-by: Katon Minhas
2025-04-25 21:34:51 +00:00
Alex Galarce 4844dcfd50 Merged in feature/tin-npi-prompt-formatting (pull request #490)
Collect TIN/NPI/Name page-by-page and run a second pass for IS_GROUP

* configure first pass: no providers marked IS_GROUP.  Allows simplification of prompt

* Add group provider identification logic in second pass

* group identification: don't take 20% of pages.  Take first 3 and last 3

* Refine group provider identification logic to use pipes for JSON formatting and improve error handling

* fix mypy error for `identify_group_provider`

* Merge remote-tracking branch 'origin/main' into feature/tin-npi-prompt-formatting

* Add "PROV_INFO_JSON" to investment column order

* Refactor group provider identification to use signature page extraction and fix JSON format

* move signature page extraction to `string_utils.py` and add unit tests for it

* Update identify_group_provider to return provider name along with TIN and NPI in JSON format

* Update identify_group_provider to always use group-provided name when available

* move out GROUP_TIN_NPI_TEMPLATE to `investment_prompts.py`

* Remove deprecated PROV_GROUP_TIN_CHECK and PROV_GROUP_NPI_CHECK prompts

* Move out provider info fields from `one_to_one_funcs` to `tin_npi_funcs`

* isort

* remove debug print statements

* Remove debug print statements from provider info functions

* add note to regex_utils.py about where functions are used

* Add page_key_sort function and corresponding tests for sorting page keys

* Refactor identify_group_provider to sort pages and avoid duplicates in extracted sections

* Remove debug print statements from identify_group_provider function

* Merge remote-tracking branch 'origin/main' into feature/tin-npi-prompt-formatting

* extract_signature_page function: prioritize Textract marker for signatures and fallback to keyword search

* fix mypy error

* Update test cases to reflect changes in signature extraction logic


Approved-by: Katon Minhas
2025-04-25 20:28:52 +00:00
Katon Minhas bc59c06c37 Merged in field/initialize-patient-age (pull request #492)
Field/initialize patient age

* Update split_text so that it works on single-page contracts (discovered when testing)

* Add PATIENT_AGE_RANGE intermediate column

* Remove PATIENT_AGE_RANGE in postprocessing

* Dont convert columns to int type

* Add unit tests

* Remove test

* Update unit test

* Update unit test

* Update unit test

* Update unit test


Approved-by: Alex Galarce
2025-04-25 19:35:10 +00:00
Katon Minhas 2ff2fb3f1a Merged in feature/fix-crosswalk-mapping (pull request #491)
Feature/fix crosswalk mapping

* Update mapping for claim_type

* Fix reverse mapping issue

* Remove test file


Approved-by: Alex Galarce
2025-04-24 13:18:31 +00:00
Katon Minhas af1a16cc0c Merged in field/dynamic-codes (pull request #475)
Field/dynamic codes

* remove test

* Merge branch 'main' into field/dynamic-codes

* Merged main into field/dynamic-codes

* Update test

* Fix unit test

* Merged main into field/dynamic-codes

* Merged main into field/dynamic-codes

* Merged main into field/dynamic-codes

* Update fields with crosswalks

* Update mapping to return empty string if no mapping

* Update dynamic_funcs

* Restructure

* Update file_processing

* Update dynamic primary

* Fix dynamic primary

* Update base fields

* Update one-to-n process

* Merged main into field/dynamic-codes

* genericized get_dynamic_answers

* Update tests

* Remove test file

* dynamic_funcs cleanup

* remove prints

* add exhibit_header

* Fix imports


Approved-by: Alex Galarce
2025-04-23 22:00:02 +00:00
Alex Galarce e709a851c7 Merged in feature/print_string_when_failed_json_load (pull request #489)
Enhance universal_json_load function with detailed error handling and traceback logging

* Enhance universal_json_load function with detailed error handling and traceback logging

* Add type hint for string_dict parameter in universal_json_load function

* Update return type annotation for universal_json_load function to reflect possible return values


Approved-by: Katon Minhas
2025-04-22 21:48:45 +00:00
Katon Minhas e5e5d5d1fa Merged in feature/one-to-n-testing (pull request #486)
Feature/one to n testing

* Add field by field prec and rec

* Add field-wise prec and rec

* Merged main into feature/one-to-n-testing

* Merged main into feature/one-to-n-testing

* Merged main into feature/one-to-n-testing


Approved-by: Alex Galarce
2025-04-21 20:58:55 +00:00
Alex Galarce 297926839a Merged in bugfix/flatten_singleton_list_ints_problem (pull request #488)
Bugfix/flatten singleton list ints problem

* Fix flatten_singleton_string_list to handle non-list int strings and improve test coverage

* Fix test_flatten_singleton_string_list to handle integer input correctly


Approved-by: Katon Minhas
2025-04-21 17:42:33 +00:00
Alex Galarce c50f78e84d Merged in bugfix/format_rate_fields_with_commas (pull request #487)
format_rate_fields_with_commas: change how empty values and errors are handled

* format_rate_fields_with_commas: change how empty values and errors are handled


Approved-by: Katon Minhas
2025-04-18 22:08:05 +00:00
Alex Galarce c8e64bcd4b Merged in feature/align-tin-npi (pull request #485)
Feature/align tin npi

* Add merge_provider_info function to consolidate provider data into one-to-one results

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

* Remove debug print statement from run_one_to_one_prompts function

* turn run_regex_fields into an orchestrator function by breaking parts of it into separate functions

* Remove unused import of get_matches function and add docstring to chunk_on_matches for clarity

* Add docstring to run_regex_fields for improved clarity and documentation

* fix provider name keys in merge_provider_info

* Remove unused functions get_matches, tin_npi_prompt, and clean_tin_npi from tin_npi_funcs.py

* Set provider name to "UNKNOWN" if cleaned name is empty in clean_provider_info

* Add unit tests for clean_provider_info function to validate data processing

* Enhance docstring for get_all_matches function

* Add tests for get_all_matches and chunk_on_matches functions

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

* Implement merge_provider_info function to consolidate provider data into one-to-one results

* Refactor merge_provider_info to simplify list conversion for group and other provider information

* Remove unnecessary TIN and NPI postprocessing step from postprocess function

* Remove clean_tin_npi_other function and its invocation from postprocess function

* Use json prompts for TIN/NPI/Name and inject them into TIN_NPI_TEMPLATE

* Rename run_regex_fields to run_provider_info_fields

* Enhance TIN_NPI_TEMPLATE to include detailed instructions for extracting provider entities and their identifying information, including IS_GROUP logic for main contracting parties.

* moved TIN/NPI regexes to regex_patterns.py

* Remove unnecessary blank line in investment_values.py

* Remove debug print statements from run_provider_info_fields and get_provider_info functions

* Enhance clean_provider_info to handle various representations of IS_GROUP as boolean

* Enhance get_provider_info to include error handling for JSON parsing and ensure consistent return format


Approved-by: Katon Minhas
2025-04-18 20:50:25 +00:00
Mayank Aamseek 9ac84114c0 Merged in bugfix/daip2-156 (pull request #484)
Bugfix/daip2 156

* try blocks added

* fixed output 'of charges' in reimb_method

* Merged main into bugfix/daip2-156

* removed try block

* Merge branch 'bugfix/daip2-156' of https://bitbucket.org/aarete/doczy.ai into bugfix/daip2-156

* Merged main into bugfix/daip2-156


Approved-by: Alex Galarce
2025-04-17 19:01:56 +00:00
Alex Galarce 54910a7459 Merged in hotfix/flatten-list-to-string (pull request #478)
Hotfix/flatten list to string

* updated
* rate fields fix
* updated the singleton_list
* updated
* added
* Checked_files

* added

* Merged main into hotfix/flatten-list-to-string

* format_rate_fields_with_commas

* Update test

* flatten_singleton_string_list - new cases

* Update

* Removed unneccessary case

* Remove case

* Updated the test cases
* Merge remote-tracking branch 'origin/main' into hotfix/flatten-list-to-string

* Refactor flatten_singleton_string_list to handle empty input and return a comma-separated string for multiple elements


Approved-by: Katon Minhas
2025-04-16 17:42:51 +00:00
Alex Galarce 2700fa2c9c Merged in feature/fix_string_utils (pull request #482)
Enhance is_empty function to handle pandas Series and improve empty value checks

* Enhance is_empty function to handle pandas Series and improve empty value checks

* Enhance is_empty function to support pandas Series and add pd_mask parameter for flexible empty checks


Approved-by: Katon Minhas
2025-04-16 14:52:37 +00:00
VenkataKrishna Reddy Avula df5f6088c7 Merged in hotfix/reimb_issue_fixes (pull request #477)
Hotfix/reimb issue fixes

* updated DYNAMIC_CHECK prompt

* updated date_fix_prompt to YYYYMMDD format

* filled N/A values for REIMB_PROV_TIN

* changed YYYYMMDD to YYYY/MM/DD

* extracting TIN, NPI,NAME as a tuple

* updated TIN, NPI,NAME as a tuple prompt

* Merge remote-tracking branch 'origin/main' into hotfix/reimb_issue_fixes

* fix: correct spelling of 'memorize' to 'memoize' in cache decorator comment

* combined postprocess date format check functions

* Merged main into hotfix/reimb_issue_fixes

* updated postprocessing

* rename and slight refactor

* remove unused imports, re-sort

* remove unused imports from postprocess.py

* Fix unit tests

* re-add imports which are needed for tests to pass (?)

* Fix column name in auto-renewal termination date handling

* Fix formatting in postprocess function


Approved-by: Katon Minhas
2025-04-14 21:51:34 +00:00
Mayank Aamseek 7fc0dba69f Merged in issuefix/group_name (pull request #479)
group_name all issue fixes

* group_name all issue fixes


Approved-by: Katon Minhas
2025-04-14 13:50:26 +00:00
Mayank Aamseek 6f1d7d90b4 Merged in hotfix/methodology_breakout_issue_fixes (pull request #456)
Hotfix/methodology breakout issue fixes

* Merge branch 'hotfix/methodology_breakout_issue_fixes' of https://bitbucket.org/aarete/doczy.ai into hotfix/methodology_breakout_issue_fixes
merged with current local changes

* opps methodology added

* Merge branch 'main' into hotfix/methodology_breakout_issue_fixes

* Merge branch 'main' into hotfix/methodology_breakout_issue_fixes
merged changes from main

* Merged main into hotfix/methodology_breakout_issue_fixes

* duplicate N/A fixed

* Merge branch 'hotfix/methodology_breakout_issue_fixes' of https://bitbucket.org/aarete/doczy.ai into hotfix/methodology_breakout_issue_fixes
merged changes from main

* updated AARETE_DERIVED_REIMB_METHOD prompt

* fee schedule prompt change

* REIMB_PCT_RATE prompt updated

* Merged main into hotfix/methodology_breakout_issue_fixes

* opps moved to grouper

* fee rate format fixed

* removed incentives

* removed funding and additional reimbursement

* separate invalid reimb

* Merge branch 'main' into hotfix/methodology_breakout_issue_fixes

* merged main into current branch

* updated valid reimb and fee_schedule_version

* code structure fix

* code structure fix 2

* Merge branch 'main' into hotfix/methodology_breakout_issue_fixes

* updated methodology breakout fields

* test notebook updated

* Merged main into hotfix/methodology_breakout_issue_fixes


Approved-by: Katon Minhas
2025-04-10 21:59:17 +00:00
Alex Galarce e3cd8372de Merged in feature/new-stop-loss-and-outlier-fields (pull request #474)
Feature/new stop loss and outlier fields

* initial commit; handle term_key cases, add flexibility for service and methodology, set prompt to `null` for term_key filled fields

* prompt changes for all outlier fields

* Merge remote-tracking branch 'origin/main' into feature/new-stop-loss-and-outlier-fields

* reorder columns, rework CD_DESC for outlier, replace redundant column OUTLIER_FIXED_LOSS_THRESHOLD (deprecated by OUTLIER_FIXED_LOSS_CHARGE_THRESHOLD)

* add OUTLIER_MAXIMUM_FREQUENCY prompt for outlier claims cap frequency

* add OUTLIER_RANGE_NBR_DAYS prompt to specify period for calculating outlier payments

* fix term key naming to align with Maria columns

* remove debug print statements

* add Maria stop loss columns

* stop loss prompts


Approved-by: Katon Minhas
2025-04-10 21:54:37 +00:00
Rahul Ailaboina 21e71c4054 Merged in hotfix/molina_files (pull request #473)
Hotfix/molina files

* fix the cpt fields
* None values checking safely

Approved-by: Alex Galarce
2025-04-10 15:34:06 +00:00
Alex Galarce bea96b67cf Merged in hotfix/poetry-lock (pull request #472)
update poetry.lock

* update poetry.lock


Approved-by: Katon Minhas
2025-04-08 21:11:47 +00:00
Alex Galarce 30b75ea14d Merged in feature/reimb_lesser_of_id (pull request #471)
add REIMB_LESSER_OF_ID

* add REIMB_LESSER_OF_ID

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


Approved-by: Katon Minhas
2025-04-08 20:42:19 +00:00
Rahul Ailaboina d6abe44a69 Merged in feature/postprocess-Cleanup (pull request #464)
Feature/postprocess Cleanup

* Added aarete derived

* removed the dev file
* reverted
* Merge branch 'main' into feature/postprocess-Cleanup

* Update poetry lock

* Update poetry and pyproject

* Update poetry

* Update field path

* Update test_date_postprocess

* Update tests

* Merged main into feature/postprocess-Cleanup

* Update test

* Update test

* addedfield_json_path

* minor changes

* removed

* Updated

* minor change

* added llm invoke

* removed unnecessary imports

* add

* self added

* removed comments

* Merged main into feature/postprocess-Cleanup

* Merged main into feature/postprocess-Cleanup


Approved-by: Katon Minhas
2025-04-08 20:14:49 +00:00