Update reimbursement cleaning parser

This commit is contained in:
Katon Minhas
2026-02-03 00:21:10 -05:00
parent bb96edb7c5
commit b5b19d81a0
3 changed files with 29 additions and 4 deletions
+1 -1
View File
@@ -421,7 +421,7 @@ def validate_reimbursements_for_llm(answer_dict: dict[str, str], filename: str)
f"LLM response for reimbursement validation in {filename}:\n{llm_response}"
)
final_answer = _parser(llm_response)
return final_answer == "YES"
return "YES" in final_answer
def prompt_dynamic(text: str, field_prompts, filename):
+27 -2
View File
@@ -1,6 +1,9 @@
from src.pipelines.shared.postprocessing import aarete_derived
from src.constants.constants import Constants
from src.utils import io_utils
from src.pipelines.saas.prompts import prompt_calls
from src.pipelines.shared.extraction.one_to_n_funcs import reimbursement_level
constants = Constants()
@@ -8,6 +11,28 @@ all_exhibit_rows = [
{"LOB" : ['Medicaid']}
]
all_exhibit_rows = aarete_derived.get_crosswalk_fields(all_exhibit_rows, constants)
page_text = """
PARKLAND COMMUNITY HEALTH PLAN, INC.
A PROGRAM OF DALLAS COUNT HOSPITAL DISTRICT
PARTICIPATING ANCILLARY SERVICES PROVIDER AGREEMENT
Attachment B
SECTION 1 - PCHP MEDICAID STAR HMO SERVICES
Participating Ancillary Services Provider shall be reimbursed for medically necessary Covered
Services provided to HEALTHfirst Members as follows:
1. One hundred percent (100%) of the prevailing yearly and current Medicaid fee schedule for
the State of Texas or the Participating Ancillary Services Provider's usual and customary
charge, whichever is less.
SECTION 2 PCHP CHIP HMO SERVICES
Participating Ancillary Services Provider shall be reimbursed for Covered Services provided to
KIDSfirst Members as follows:
1. One hundred percent (100%) of the prevailing yearly and current Medicaid fee schedule for
the State of Texas or the Participating Ancillary Services Provider's usual and customary
charge, whichever is less.
"""
filename= "sample_files"
print("all_exhibit_rows: ", all_exhibit_rows)
reimbursement_primary_answers = reimbursement_level(
page_text, constants, filename
)
print("FInal: ", reimbursement_primary_answers)
@@ -97,7 +97,7 @@ def reimbursement_level(
reimbursement_primary_answers = clean_reimbursement_primary(
reimbursement_primary_answers, constants, filename
)
return reimbursement_primary_answers