Merged in feature/lesser-table-caching-refactor-hybrid (pull request #847)

Feature/lesser table caching refactor hybrid

* chore: Remove unused duplicate main.py from shared pipeline

* fix: Correct crosswalk paths in aarete_derived.py

* chore: Remove unused documentation files from fieldExtraction

* docs: Add documentation files to documentation folder

* docs: Update README with uv setup, expanded project structure, and branching conventions

* docs: Add uv installation steps with Ubuntu/WSL emphasis

* Enable prompt caching for all remaining LLM calls

- Add _INSTRUCTION() functions for: EXHIBIT_HEADER, EXHIBIT_LINKAGE,
  EXHIBIT_TITLE_MATCH, DATE_FIX, DERIVED_TERM_DATE, CHECK_PROVIDER_NAME_MATCH,
  SPECIAL_CASE_ASSIGNMENT
- Update all invoke_claude() calls in saas and clover pipelines to use
  cache=True with corresponding _INSTRUCTION() functions
- Add new instructions to get_cacheable_instructions() for cache warming
- Update tests for new instruction functions

Functions now using caching:
- prompt_exhibit_level
- prompt_exhibit_lesser (EXHIBIT_LEVEL_LESSER_OF)
- prompt_fee_schedule_breakout
- prompt_grouper_breakout
- prompt_special_case_assignment
- prompt_exhibit_linkage
- prompt_exhibit_header
- prompt_smart_chunked (ONE_TO_ONE templates)
- prompt_date_fix
- prompt_derived_term_date
- prompt_exhibit_title_match
- provider_name_match_check

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Reorder

* feat: Add bcbs_promise client pipeline with OFFSET_TERM extraction

- Add new bcbs_promise client with HSC-based OFFSET_TERM field extraction
- Extract full paragraph text of offset/recoupment provisions from contracts
- Derive OFFSET_INDICATOR (Y/N) from OFFSET_TERM presence
- Fix reorder_columns to preserve extra columns not in COLUMN_ORDER
- Update QC/QA output path to outputs/qc_qa/

* fix: Update dev deps and test assertions for QC/QA output path

- Add pytest/pytest-mock to dev dependencies for mypy type checking
- Update test assertions to expect outputs/qc_qa instead of qa_qc_output

* style: Apply black formatting to prompt_templates.py

* Merge main, move scripts

* Archive some scripts

* update py version

* remove .py version file

* Remove ASCII characters

* Restore testbed code

* restore tracking

* Update testbed metrics

* Enable prompt caching for CODE_LAST_CHECK, FILL_BILL_TYPE, DUAL_LOB_CHECK, and GROUPER_BREAKOUT

- Add CODE_LAST_CHECK_INSTRUCTION() for service specificity classification
- Add FILL_BILL_TYPE_INSTRUCTION() for bill type code determination
- Add DUAL_LOB_CHECK_INSTRUCTION() for Medicare/Medicaid classification
- Update code_funcs.py to use caching for CODE_LAST_CHECK, FILL_BILL_TYPE, GROUPER_BREAKOUT
- Update postprocessing_funcs.py to use caching for DUAL_LOB_CHECK
- Add new instructions to get_cacheable_instructions() for cache warming
- Add unit tests for new instruction functions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix postprocessing_funcs to remove invalid columns

* Merge branch 'main' into feature/lesser-table-caching-refactor-hybrid

* Revert prompt caching changes from aed1b73c

* update formatting

* Update imports


Approved-by: Sha Brown
Approved-by: Praneel Panchigar
This commit is contained in:
Katon Minhas
2026-01-26 16:52:55 +00:00
parent dcec3f4b7a
commit afb6d5185d
584 changed files with 17548 additions and 33208 deletions
@@ -0,0 +1,266 @@
{
"metadata": {
"from_col": "PROGRAM",
"to_col": "AARETE_DERIVED_PROGRAM"
},
"mapping": {
"Children's Health Insurance Program (CHIP)" : "CHIP",
"Children's Health Insurance Program Perinate (CHIP-P)" : "CHIPP",
"Healthy Kids" : "CHIP",
"Medicaid Managed Care" : "MMC",
"Affordable Care Act (ACA)" : "ACA",
"Aged, Blind, and Disabled (ABD)" : "ABD",
"Alternative Benefit Plan (ABP)" : "ABP",
"Community First Choice (CFC)" : "CFC",
"Foster Care (FC)" : "FC",
"Home and Community Based Services Waiver (HCBS)" : "HCBS",
"Intellectual and Developmental Disability (IDD)" : "IDD",
"Institution for Medical Disease (IMD)" : "IMD",
"Managed Long Term Care (MLTC)" : "MLTC",
"Self-Directed Personal Assistant Services (PAS)" : "PAS",
"Psych Under 21 (PU21)" : "PU21",
"Supplemental Nutrition Assistance Program (SNAP)" : "SNAP",
"Temporary Assistance Needy Families (TANF)" : "TANF",
"Long-Term Services and Supports (LTSS)" : "LTSS",
"Special Needs Plan (SNP)" : "SNP",
"Medicare Advantage Special Needs Plan (MA-SNP)" : "MASNP",
"Chronic Condition Special Needs Plan (CSNP)" : "CSNP",
"Dual Eligible Special Needs Plan (DSNP)" : "DSNP",
"Fully Integrated Dual Eligible Special Needs Plan (FIDE-SNP)" : "FIDE SNP",
"Highly Integrated Dual Eligible Special Needs Plan (HIDE-SNP)" : "HIDE SNP",
"Institutional Special Needs Plan (I-SNP)" : "ISNP",
"Medicare-Medicaid Alignment Initiative (MMAI)" : "MMAI",
"Medicare-Medicaid Coordinated Plan (MMCP)" : "MMCP",
"Medicare-Medicaid Plan (MMP)" : "MMP",
"Program of All-Inclusive Care for the Elderly (PACE)" : "PACE",
"Advantage" : "MA",
"Medicare Advantage" : "MA",
"Medicare Part C" : "MA",
"Supplemental" : "Supp",
"Medigap" : "Supp",
"Self-Funded" : "SF",
"Administrative Services Only (ASO)" : "SF",
"Third Party Administrator (TPA)" : "SF",
"Fully-Funded" : "FF",
"Platinum" : "PLAT",
"Gold" : "GOLD",
"Silver" : "SLVR",
"Bronze" : "BRNZ",
"Connector" : "CONN",
"Catastrophic" : "CATA"
},
"state_mapping" : {
"AL" : {
"ALL Kids" : "CHIP"
},
"AK" : {
"Denali KidCare" : "CHIP",
"DenaliCare" : "DENALI"
},
"AZ" : {
"Arizona Health Care Cost Containment System (AHCCCS)" : "AHCCCS",
"KidsCare" : "CHIP"
},
"AR" : {
"ARKids First" : "CHIP"
},
"CA" : {
"Medi-Cal" : "MEDI_CAL",
"Covered California" : "COVEREDCAL",
"Medi-Cal Access Program (MCAP)" : "CHIP",
"Healthy Families Benefit Program" : "CHIP"
},
"CO" : {
"Health First Colorado" : "HFCO",
"Connect for Health Colorado" : "CFHCO",
"Child Health Plan Plus (CHP+)" : "CHIP"
},
"CT" : {
"Husky Health" : "HUSKY",
"Access Health CT" : "AHCT",
"HUSKY A" : "CHIP",
"HUSKY B" : "CHIP",
"HUSKY C" : "CHIP",
"HUSKY D" : "CHIP"
},
"DE" : {
"Diamond State Health Plan" : "DSHP",
"Choose Health Delaware" : "CHDE",
"Delaware Healthy Children Program (DHCP)" : "CHIP"
},
"DC" : {
"DC Health Link" : "DCHL",
"DC Healthy Families" : "CHIP"
},
"FL" : {
"Florida Statewide Medicaid Managed Care Program (SMMC)" : "SMMC",
"Florida KidCare" : "CHIP"
},
"GA" : {
"Georgia Access" : "GAACCESS",
"PeachCare for Kids" : "CHIP"
},
"HI" : {
"Med-Quest" : "MQUEST",
"QUEST Integration" : "CHIP"
},
"ID" : {
"Your Health Idaho" : "YHID",
"Idaho Medicaid for CHIP" : "CHIP"
},
"IL" : {
"HealthChoice Illinois" : "HCIL",
"Get Covered Illinois" : "GCIL",
"All Kids" : "CHIP"
},
"IN" : {
"Hoosier Healthwise" : "CHIP"
},
"IA" : {
"Iowa Health Link" : "IAHL",
"Healthy and Well Kids in Iowa (HAWK-I)" : "CHIP"
},
"KS" : {
"KanCare" : "KANCARE"
},
"KY" : {
"Kynect" : "KYNECT",
"Kentucky Children's Health Insurance Program (KCHIP)" : "CHIP"
},
"LA" : {
"Healthy Louisiana" : "HEALTHYLA",
"Louisiana State Insurance Exchange" : "LASIE",
"LaCHIP" : "CHIP"
},
"ME" : {
"MaineCare" : "MECARE",
"Cover ME" : "COVERME",
"Cub Care" : "CHIP"
},
"MD" : {
"Maryland HealthChoice" : "MDHC",
"Maryland Children's Health Program (MCHP)" : "CHIP"
},
"MA" : {
"MassHealth" : "MASSHEALTH",
"MassHealth CHIP" : "CHIP"
},
"MI" : {
"Healthy Michigan Plan" : "HMIP",
"MI Child" : "CHIP"
},
"MN" : {
"Minnesota Medical Assistance" : "MNMA",
"MNSure" : "MNSURE",
"MinnesotaCare" : "CHIP"
},
"MS" : {
"MississippiCAN" : "MSCAN",
"Mississippi CHIP" : "CHIP"
},
"MO" : {
"MO HealthNet" : "MOHN",
"MO HealthNet for Kids" : "CHIP"
},
"MT" : {
"Healthy Montana Kids (HMK)" : "CHIP"
},
"NE" : {
"Heritage Health" : "HHNE",
"Kids Connection" : "CHIP"
},
"NV" : {
"Nevada Health Link" : "NVHL",
"Nevada Check Up" : "CHIP"
},
"NH" : {
"NH Health Families" : "NHHF",
"New Hampshire Healthy Families" : "CHIP"
},
"NJ" : {
"FamilyCare" : "NJFC",
"Get Covered NJ" : "GCNJ"
},
"NM" : {
"Centennial Care" : "CCNM",
"WellNM" : "WELLNM",
"New MexiKids" : "CHIP"
},
"NY" : {
"NY State of Health" : "NYSOH",
"Health and Recovery Plan (HARP)" : "HARP",
"Child Health Plus (CHP)" : "CHPLUS"
},
"NC" : {
"NC Health Choice" : "CHIP"
},
"ND" : {
"Healthy Steps" : "CHIP"
},
"OH" : {
"Healthy Start" : "CHIP",
"MyCare Ohio" : "MYCAREOH"
},
"OK" : {
"SoonerCare" : "SOONER",
"SoonerSelect" : "SOONER"
},
"OR" : {
"Oregon Health Plan" : "ORHP",
"OregonHealthCare" : "ORHC"
},
"PA" : {
"Pennsylvania Medical Assistance" : "PAMA",
"Pennie" : "PENNIE",
"Pennsylvania CHIP" : "CHIP"
},
"RI" : {
"HealthSource RI" : "HSRI",
"Rite Care" : "CHIP"
},
"SC" : {
"Partners for Healthy Children" : "CHIP"
},
"SD" : {
"South Dakota Medicaid for CHIP" : "CHIP"
},
"TN" : {
"TennCare" : "TENNCARE",
"CoverKids" : "CHIP"
},
"TX" : {
"STAR" : "STAR",
"STAR Health" : "STAR",
"STAR Kids" : "STAR Kids",
"STAR+PLUS" : "STAR+PLUS"
},
"UT" : {
"Healthy U" : "HEALTHYU",
"Healthy Kids Plus" : "CHIP"
},
"VT" : {
"Green Mountain Care" : "GMCARE",
"Dr. Dynasaur" : "CHIP"
},
"VA" : {
"Cardinal Care" : "CCVA",
"Cover Virginia" : "COVERVA",
"FAMIS" : "CHIP"
},
"WA" : {
"Apple Health" : "AHWA",
"Washington Healthplanfinder" : "WAHPF",
"Apple Health for Kids" : "CHIP"
},
"WV" : {
"WVCHIP" : "CHIP"
},
"WI" : {
"BadgerCare Plus" : "BADGER"
},
"WY" : {
"EqualityCare" : "EQCAREWY",
"Kid Care CHIP" : "CHIP"
}
}
}