Commit Graph

429 Commits

Author SHA1 Message Date
Faizan Mohiuddin f736bde987 Merged in feature/prompt-caching (pull request #737)
Feature/prompt caching

* caching implemented

* caching

* Merge branch 'main' into feature/prompt-caching

* Merged main into feature/prompt-caching

* Merged main into feature/prompt-caching

* caching

* fixed lob

* Merged main into feature/prompt-caching


Approved-by: Katon Minhas
2025-10-16 20:32:00 +00:00
VenkataKrishna Reddy Avula 64287a2c21 Merged in bugfix/molina_nv_reimb_method_issues (pull request #738)
Bugfix/molina nv reimb method issues to main

*  added asc and apc full forms in prompt

* updated grouper instructions for reimb method

* updated reimb method prompt

* Merged main into bugfix/molina_nv_reimb_method_issues


Approved-by: Katon Minhas
2025-10-15 15:24:22 +00:00
Mayank ab0c570f54 changes reversed 2025-10-15 13:41:12 +00:00
Mayank f5dc3d82a1 logging added 2025-10-15 13:39:07 +00:00
Katon Minhas 169bbf2773 Merged in bugfix/process-only-after-title (pull request #736)
Bugfix/process only after title

* Update print

* Update exhibit dict creation

* Detect Participating Provider Agreement

* Remove test file

* Merged main into bugfix/process-only-after-title

* Merged main into bugfix/process-only-after-title


Approved-by: Faizan Mohiuddin
2025-10-13 19:03:31 +00:00
Sha Brown c56270c951 Merged in feature/field_type_config (pull request #731)
Feature/field type config

* Added field type procesing conditional logic

* Updated field type naming convention in config.py; Updated date_postprocessing to avoid column key missing issue

* Cleaned up code; Move merging functionality to one to one processing block

* Merged main into feature/field_type_config


Approved-by: Katon Minhas
2025-10-13 18:54:10 +00:00
Katon Minhas a7090c8327 Merged in bugfix/ut-issues (pull request #733)
Bugfix/ut issues

* Update exhibit linking

* prompt_calls refactor

* remove test

* Add Healthy Kids Program

* Move Healthy Kids to UT specifically

* Remove header check from Dynamic process

* Merged main into bugfix/ut-issues

* prep for merge

* remove deprecated tests

* Merged main into bugfix/ut-issues

* Merged main into bugfix/ut-issues


Approved-by: Faizan Mohiuddin
2025-10-10 20:47:13 +00:00
Mayank Aamseek 82c2643842 Merged in bugfix/stoploss-carveout (pull request #735)
Bugfix/stoploss carveout

* stoploss and carveout fixes

* stoploss and carveout fixes

* prompt update

* Merged main into bugfix/stoploss-carveout


Approved-by: Katon Minhas
2025-10-10 18:09:34 +00:00
VenkataKrishna Reddy Avula 81c4813695 Merged in bugfix/grouper_cd_and_rev_cd (pull request #734)
bugfix/grouper_cd_and_rev_cd to main

* updated code explicit prompt template


Approved-by: Katon Minhas
2025-10-10 16:42:55 +00:00
VenkataKrishna Reddy Avula 8ec2561a68 Merged in bugfix/special-cases (pull request #716)
Bugfix/special cases to Main

* prompt update

* Merge branch 'main' into bugfix/json_and_unit_of_measure

* minor bugfix

* minor bugfix

* prompt update for outlier rate

* added outlier testing jupyter notebook

* Remove special case from any empty

* updated outlier breakout prompt

* Merged main into bugfix/special-cases

* reimb_method minor fix

* Merged main into bugfix/special-cases

* bugfix field to add dynamic funcs

* merged with main

* latest outlier changes

* Merged main into bugfix/special-cases

* added table guidelines for special case primary

* updated special case primary prompt

* Merged main into bugfix/special-cases

* updated special case primary table handling

* merged main into bugfix special cases

* Merged main into bugfix/special-cases

* Remove test notebooks from tracking

* trying out pipeline fix

* reverted chnages

* pipeline fix


Approved-by: Katon Minhas
2025-10-10 16:41:23 +00:00
Katon Minhas 3ca9d5b084 Merged in feature/update-exhibit-linking (pull request #732)
Feature/update exhibit linking

* Update exhibit linking

* prompt_calls refactor

* remove test


Approved-by: Karan Desai
2025-10-09 18:41:36 +00:00
VenkataKrishna Reddy Avula bb7404ed62 Merged in bugfix/utah_grouper_issues (pull request #730)
updated grouper reimb method and grouper type prompt

* updated grouper reimb method and grouper type prompt

* updated reimb method prompt


Approved-by: Katon Minhas
2025-10-09 15:26:59 +00:00
Katon Minhas 6aaa399171 Merged in bugfix/nv-issues (pull request #729)
Bugfix/nv issues

* remove non-prompted fields

* Update prompt template

* remove space

* Update reimbursement primary cleaning prompt


Approved-by: Faizan Mohiuddin
2025-10-08 21:56:51 +00:00
VenkataKrishna Reddy Avula cb6c58f8f3 Merged in bugfix/molina_nv_prov_info_issues (pull request #728)
Bugfix/molina nv prov info issues to main

* updated tin and npi pattern

* updated relevant pages search


Approved-by: Katon Minhas
2025-10-08 15:30:19 +00:00
Katon Minhas ebc7960dbd Merged in bugfix/mi-issue-fixes (pull request #727)
Bugfix/mi issue fixes

* Update mapping to allow for , or | lists

* Pipe-separation for full-context

* Update VALIDATE_REIMBURSEMENTS

* Designate Provider Submission Form as cover sheet language - make cover sheet detection more efficient

* remove deprecated functions

* remove test


Approved-by: Faizan Mohiuddin
2025-10-07 21:59:31 +00:00
Katon Minhas a910f27cd2 Merged in bugfix/mi-dynamic (pull request #726)
Bugfix/mi dynamic

* Refactor - split out one_to_n_cleaning

* Rework postprocess

* Update postprocessing - fill dynamic values if there is only 1 non-empty value

* Update to use string_utils

* Group by AARETE_DERIVED_LOB as well

* Update crosswalk mapping to handle | lists

* Update constants - run with MI flag


Approved-by: Siddhant Medar
2025-10-07 15:06:10 +00:00
VenkataKrishna Reddy Avula 354bb1c9ce Merged in bugfix/molina_tracker_issues (pull request #724)
bugfix/molina_tracker_issues to main

* provider name updated prompt

* updated provider name prompt

* Merged main into bugfix/molina_tracker_issues


Approved-by: Katon Minhas
2025-10-06 14:56:20 +00:00
Mayank Aamseek 984a3ba106 Merged in bugfix/remaining-breakout-issues (pull request #725)
remaining grouper version issue fixed

* remaining grouper version issue fixed


Approved-by: Katon Minhas
2025-10-06 14:09:10 +00:00
Mayank Aamseek bb34b0292f Merged in bugfix/methodology-breakout (pull request #723)
Bugfix/methodology breakout

* moved carveout after methodology breakout

* Merge branch 'main' into bugfix/methodology-breakout

* fixed unit_of_measure issues

* carveout_cd fixes

* pipeline error fix

* Merged main into bugfix/methodology-breakout


Approved-by: Katon Minhas
2025-10-03 18:51:30 +00:00
VenkataKrishna Reddy Avula 759f54d687 Merged in bugix/provider_info_tracker_issues (pull request #722)
bugfix/provider_info_tracker_issues to main

* updated signature page prompt


Approved-by: Katon Minhas
2025-10-03 18:49:25 +00:00
Katon Minhas ea222522ba Merged in bugfix/nv-issue-fixes (pull request #721)
Bugfix/nv issue fixes

* Add Dialysis to ancillary services list

* remove print

* Merge branch 'main' into bugfix/nv-issue-fixes

* Remove print


Approved-by: Alex Galarce
2025-10-02 18:59:49 +00:00
Alex Galarce 9cadef9795 Merged in feature/one-to-one-funcs-docs-and-cleanup (pull request #720)
Feature/one to one funcs docs and cleanup

* Refactor imports and remove unused filter_payer_from_providers function

* Update docstring for date_postprocessing function to clarify processing steps

* Augment docstrings for check_and_update_effective_date and run_full_context_fields

* Enhance docstring for one_to_one_breakout function to clarify processing steps and side effects

* remove unused import and augment docstrings


Approved-by: Katon Minhas
2025-10-02 17:02:17 +00:00
Katon Minhas b6f1b8d523 Merged in bugfix/network-mapping (pull request #719)
Update mapping to detect if field is aarete_derived

* Update mapping to detect if field is aarete_derived

* Merged main into bugfix/network-mapping


Approved-by: Alex Galarce
2025-10-01 19:42:07 +00:00
Katon Minhas fef60880e9 Merged in bugfix/claim-type-cd (pull request #718)
update mapping values

* moved carveout after methodology breakout


Approved-by: Alex Galarce
2025-10-01 17:27:04 +00:00
Alex Galarce 674add9a3e Merged in feature/black-and-isort (pull request #717)
Feature/black and isort

* black and isort constants

* black and isort codes

* black and isort crosswalks

* black and isort investment

* black and isort prompts

* isort testbed

* isort tracking

* black and isort utils

* poetry and black tests


Approved-by: Katon Minhas
2025-09-30 20:56:02 +00:00
Alex Galarce ae4eda6f25 Merged in feature/one-to-n-docs (pull request #715)
Feature/one to n docs

* Refactor function signatures and improve imports in one_to_n_funcs.py

* Enhance type hints and documentation for carveout_check and methodology_breakout functions

* Add docstring to methodology_breakout_secondary function for clarity on parameters and return values

* Add docstring to special_case_breakout function for clarity on parameters and return values

* Enhance docstring for deduplicate_with_accumulator function to clarify behavior and parameters

* Enhance docstring for filter_services_without_reimbursements function to clarify validation process and answer structure

* Enhance docstring for filter_services_without_reimbursements function to clarify filtering criteria and validation process

* Enhance docstring for split_compound_reimbursements function to clarify the splitting process and provide an example

* Enhance docstring for split_reimb_dates function to clarify date processing, parameters, return values, and provide an example

* Remove unused regex import from one_to_n_funcs.py

* Remove unused Delimiter import from one_to_n_funcs.py


Approved-by: Katon Minhas
2025-09-30 14:04:47 +00:00
Katon Minhas b788ffc352 Merged in bugfix/dynamic (pull request #714)
Bugfix/dynamic

* Update MA-SNP

* Update LOB relationship prompt

* Update lob-relationship prompt

* Remove test

* Remove print

* revert lob relatinoship function

* Merged main into bugfix/dynamic

* Update prompt_call


Approved-by: Alex Galarce
2025-09-29 16:13:01 +00:00
Alex Galarce 0562b90646 Merged in feature/io-utils-docs (pull request #713)
io_utils documentation

* add docstring to read_local function and handle file read errors gracefully by returning None on failure

* update read_local function to support .xlsx files and improve error handling

* add docstring to read_s3 function to clarify its purpose and return value

* refactor read_s3 and read_s3_csv functions to improve error handling and add type hints

* improve error handling in read_s3_csv function for CSV file parsing

* enhance read_input function with error handling and detailed docstring

* Add TODOs for read_input_csv and filter_already_processed functions; add type hints and docstring for remove_txt_extension

* enhance write_local function documentation; make docstrings more consistent when there is a "notes" section

* enhance write_local and write_s3 functions; improve documentation, add error output type handling, and ensure consistent CSV writing options

* refactor test_io_utils.py; reorganize imports and enhance read_input_local test with additional mock for file existence


Approved-by: Katon Minhas
2025-09-26 20:47:55 +00:00
VenkataKrishna Reddy Avula 814d3e0636 Merged in bugfix/provider_info (pull request #710)
Bugfix/provider info to refactor/one-to-n

* Applied suggestion to fieldExtraction/src/prompts/investment_prompts.json
* update unit test

* Update Carveout IND and Default IND logic

* Split out exhibit-level lesser

* Bugfix

* update lesser of exhibit prompt

* Bugfix

* exhibit lesser of varible name bugfix

* Update exhibit lesser of passing

* Update Exhibit-level prompt template

* Shorten full_context prompt length if the questions are long

* Special case assignment index

* Resolve unit tests

* updated UC IND prompt

* Remove print

* update one-to-n unit test

* added dot based date example

* updated date fix prompt

* Merged in bugfix/json_error_and_unit_of_measure (pull request #708)

Bugfix/json error and unit of measure

* json parser fixes and prompt changes

* universal json load fixed

* json error fixed

* json error fixed 2

* Merged refactor/one-to-n into bugfix/json_error_and_unit_of_measure


Approved-by: Katon Minhas

* added new tin format

* updated signature page prompt

* updated tin search and tin duplication

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

* extended duplicate logic to npi and names

* Merged main into bugfix/provider_info


Approved-by: Katon Minhas
2025-09-25 16:48:23 +00:00
Mayank Aamseek 4651248ca3 Merged in bugfix/json_and_unit_of_measure (pull request #709)
json parsing fix

* OUTLIER_TERMS-->OUTLIER_TERM standardization

* Applied suggestion to fieldExtraction/src/prompts/investment_prompts.json
* update unit test

* Update Carveout IND and Default IND logic

* Split out exhibit-level lesser

* Bugfix

* update lesser of exhibit prompt

* Bugfix

* exhibit lesser of varible name bugfix

* Update exhibit lesser of passing

* Update Exhibit-level prompt template

* Shorten full_context prompt length if the questions are long

* Special case assignment index

* Resolve unit tests

* updated UC IND prompt

* Remove print

* update one-to-n unit test

* added dot based date example

* updated date fix prompt

* Merged in bugfix/json_error_and_unit_of_measure (pull request #708)

Bugfix/json error and unit of measure

* json parser fixes and prompt changes

* universal json load fixed

* json error fixed

* json error fixed 2

* Merged refactor/one-to-n into bugfix/json_error_and_unit_of_measure


Approved-by: Katon Minhas

* json parsing fix

* prompt update

* Merge branch 'main' into bugfix/json_and_unit_of_measure

* minor bugfix

* minor bugfix


Approved-by: Alex Galarce
2025-09-25 14:16:56 +00:00
Katon Minhas f12d753b92 Merged in bugfix/fee-schedule (pull request #712)
Bugfix/fee schedule

* Initialize grouper pct and base rate prmopts

* Update postprocessing

* Merged main into bugfix/fee-schedule

* Prep for merge


Approved-by: Alex Galarce
2025-09-24 22:05:54 +00:00
Alex Galarce c5af046cde Merged in feature/improve-logging-docs (pull request #711)
Feature/improve logging docs

* Enhance PerFileHandler documentation and functionality for improved logging context management

* Add more docuementation

* Update logging_utils.py documentation for clarity and usage examples

* Enhance logging comments for clarity on per-file logging setup and concurrent processing

* Enhance logging comments for clarity on per-file logging context and its implications


Approved-by: Katon Minhas
2025-09-24 21:31:38 +00:00
Katon Minhas 1050287397 Merged in refactor/one-to-n (pull request #702)
Refactor/one to n

* remove print

* Update logging for fsbreakout and grouper breakout

* Additional type hints

* updated special case primary

* Remove deprecated special case check

* OUTLIER_TERMS-->OUTLIER_TERM standardization

* Applied suggestion to fieldExtraction/src/prompts/investment_prompts.json
* update unit test

* Update Carveout IND and Default IND logic

* Split out exhibit-level lesser

* Bugfix

* update lesser of exhibit prompt

* Bugfix

* exhibit lesser of varible name bugfix

* Update exhibit lesser of passing

* Update Exhibit-level prompt template

* Shorten full_context prompt length if the questions are long

* Special case assignment index

* Resolve unit tests

* updated UC IND prompt

* Remove print

* update one-to-n unit test

* added dot based date example

* updated date fix prompt

* Merged in bugfix/json_error_and_unit_of_measure (pull request #708)

Bugfix/json error and unit of measure

* json parser fixes and prompt changes

* universal json load fixed

* json error fixed

* json error fixed 2

* Merged refactor/one-to-n into bugfix/json_error_and_unit_of_measure


Approved-by: Katon Minhas


Approved-by: Alex Galarce
2025-09-24 15:56:27 +00:00
VenkataKrishna Reddy Avula a9318cf1d2 Merged in bugfix/provider_info_tracker_issues (pull request #706)
Bugfix/provider info tracker issues to main

* testing TIN AND NPI

* print statements added

* updated condition for header and footer tin and npi check

* tin testing for hyphen format

* removed print statements

* updated comments


Approved-by: Katon Minhas
2025-09-15 13:59:36 +00:00
Alex Galarce ffb4e07c89 Merged in bugfix/reimb-term-issues (pull request #705)
Add time-based rate handling rules and update section labels in prompt templates

* Add time-based rate handling rules and update section labels in prompt templates

* Add mapping for MyCare Ohio in crosswalk_program.json and update state mapping for Ohio in crosswalk_program_lob.json

* Update test parameters and state configuration in testing notebook

* Update exhibit-wide payment constraint prompt to exclude administrative processing language

* Merge remote-tracking branch 'origin/main' into bugfix/reimb-term-issues

* Refine exhibit-wide payment constraint prompt to clarify extraction criteria and examples

* Enhance exhibit-wide payment constraint prompt with guidance for abbreviated terms and clarify acceptable constraints

* Update SERVICE_TERM prompt to specify healthcare services and clarify extraction criteria


Approved-by: Katon Minhas
2025-09-11 21:06:52 +00:00
VenkataKrishna Reddy Avula 760171c084 Merged in bugfix/methodology_breakout_tracker_issue_fixes (pull request #703)
Bugfix/methodology breakout tracker issue fixes to main

* fee schedule prompt change

* Merged main into bugfix/methodology_breakout_tracker_issue_fixes

* updated aarete derived fee schedule prompt

* updated fee schedule prompt

* Merged main into bugfix/methodology_breakout_tracker_issue_fixes


Approved-by: Alex Galarce
2025-09-11 13:31:50 +00:00
Mayank Aamseek 5d196843da Merged in bugfix/trigger_cap_fixes (pull request #704)
Bugfix/trigger cap fixes

* stoploss prompt added again

* stoploss prompt added again

* stoploss prompt updated

* reverted back to one stage for trigger cap cases

* Merge branch 'main' into bugfix/trigger_cap_fixes

* pipeline error fixed

* incorrect discount special case fixed


Approved-by: Alex Galarce
2025-09-11 13:31:03 +00:00
Alex Galarce aaf1e853b3 Merged in feature/change-tin-validation-logging-level (pull request #701)
Change logging level from info to debug for OCR correction and extraction summaries

* Change logging level from info to debug for OCR correction and extraction summaries


Approved-by: Katon Minhas
2025-09-08 19:10:51 +00:00
Katon Minhas 92cc0920c5 Merged in bugfix/stop_loss_fixes (pull request #700)
Bugfix/stop loss fixes

* stoploss prompt added again

* stoploss prompt added again

* stoploss prompt updated


Approved-by: Alex Galarce
2025-09-08 14:34:06 +00:00
Alex Galarce c0fa621aed Merged in bugfix/multi-tin-npi-fix (pull request #699)
Bugfix/multi tin npi fix

* Add debug logging for OCR candidates and provider info extraction

* Update TIN and NPI extraction instructions to handle multiple values in a single record

* Add validation layer to cross-check TINs and NPIs with regex findings in provider info extraction

* Enhance exact match extraction by normalizing identifiers and validating lengths for TIN and NPI


Approved-by: Katon Minhas
2025-09-05 21:21:54 +00:00
Alex Galarce 306034820c Merged in feature/tin-enhancements (pull request #697)
Feature/tin enhancements

* Add OCR-correctable TIN patterns and substitution mapping

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

* Refactor OCR-correctable TIN pattern and enhance documentation for clarity

* Enhance get_all_matches function with type hints and improve documentation; add get_all_matches_with_ocr for OCR-correctable matches

* Add attempt_ocr_correction function for TIN OCR error handling and validation

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

* Integrate OCR correction for TIN extraction in run_provider_info_fields; log corrections for monitoring

* Refactor OCR-correctable patterns in regex_patterns.py; add NPI_OCR_PATTERN and enhance documentation for clarity

* Enhance OCR correction in attempt_ocr_correction to support both TIN and NPI; update validation logic for identifier lengths

* Integrate NPI OCR correction in run_provider_info_fields; log corrections for monitoring

* Enhance logging in run_provider_info_fields to summarize TIN and NPI extraction quality; include counts of exact and OCR-corrected identifiers

* Add unit and integration tests for OCR correction

* isort

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

* Merged main into feature/tin-enhancements


Approved-by: Katon Minhas
2025-09-05 15:15:39 +00:00
Mayank Aamseek 457249e768 Merged in bugfix/carveout_cd_fixes (pull request #694)
Bugfix/carveout cd fixes

* comment added

* prompt change

* prompt change

* Merged main into bugfix/carveout_cd_fixes

* updated payment carveout definition

* prompt refinement

* updated carveout prompt


Approved-by: Alex Galarce
2025-09-05 14:46:12 +00:00
Katon Minhas 84c73948f4 Merged in hotfix/new-column-order (pull request #698)
Add new columns to proper order

* Add new columns to proper order


Approved-by: Alex Galarce
2025-09-04 21:31:16 +00:00
Katon Minhas 0b00cc5ddd Merged in feature/initialize-phase-5 (pull request #696)
Feature/initialize phase 5

* Initialize at Exhibit-Level

* Merge branch 'main' into feature/initialize-phase-5

* Add all breakout fields

* Prep for merge


Approved-by: Alex Galarce
2025-09-04 18:22:35 +00:00
Katon Minhas 416a9944e8 Merged in hotfix/constants-passing (pull request #695)
Hotfix/constants passing

* E2E test passed

* Merged main into hotfix/constants-passing

* Remove print


Approved-by: Alex Galarce
2025-09-04 16:01:56 +00:00
VenkataKrishna Reddy Avula e054f69860 Merged in bugfix/multiple_outliers_fixes (pull request #688)
bugfix/multiple_outlier_fixes to main

* updated prompts

* Merged main into bugfix/multiple_outliers_fixes

* updated outlier maximum prompts


Approved-by: Katon Minhas
2025-09-04 14:06:42 +00:00
Katon Minhas edc48ec3c8 Merged in feature/filename-tin (pull request #693)
Add FILENAME_TIN

* Add FILENAME_TIN


Approved-by: Alex Galarce
2025-09-03 21:03:02 +00:00
Alex Galarce 0320d6633a Merged in bugfix/lob-fixes (pull request #692)
Bugfix/lob fixes

* Refactor update_lob_for_duals and update_grouper_base_rate_and_grouper_pct_rate functions for improved clarity and logic; add handling for 'neither' and 'n/a' cases.

* Change logging level from info to debug for various functions to reduce log verbosity.


Approved-by: Katon Minhas
2025-09-03 20:29:43 +00:00
Katon Minhas 95806f5782 Merged in bugfix/code-updates (pull request #691)
Bugfix/code updates

* Simplify get_crosswalk_field function

* Remove test

* Re-update valids

* Update test


Approved-by: Alex Galarce
2025-09-03 20:18:17 +00:00
Alex Galarce 2c98b5ebdb Merged in feature/payer-state (pull request #690)
Feature/payer state

* fix indentation for PROVIDER_STATE prompt

* Add PAYER_STATE prompt and normalize state abbreviation in run_full_context_fields

* Add PAYER_STATE to COLUMN_ORDER in investment_columns.py

* Merged main into feature/payer-state

* Only run PAYER_STATE prompt when more than one state in the batch
2025-09-03 14:04:18 +00:00