Remove debug print statements for CLAIM_TYPE_CD and provider info

This commit is contained in:
ppanchigar
2026-02-03 22:49:12 -06:00
parent deffb639cf
commit 7e3d8ea2fe
4 changed files with 0 additions and 33 deletions
-5
View File
@@ -522,11 +522,6 @@ def run_one_to_n_prompts(
)
################## CONVERT TO DF ##################
# Debug: print CLAIM_TYPE_CD before DataFrame creation
if one_to_n_results:
for i, row in enumerate(one_to_n_results[:3]): # Check first 3 rows
if "CLAIM_TYPE_CD" in row:
print(f"CLAIM_TYPE_CD before DataFrame (row {i}): {row['CLAIM_TYPE_CD']} (type: {type(row['CLAIM_TYPE_CD'])})")
one_to_n_df = pd.DataFrame(one_to_n_results)
return one_to_n_df, dynamic_one_to_one_fields, first_reimbursement_page
@@ -769,33 +769,17 @@ def get_lob_relationship(answer_dicts, exhibit_text, filename):
def one_to_n_cleaning(
all_exhibit_rows: list[dict], exhibit_text: str, constants: Constants, filename: str
):
# Debug: print CLAIM_TYPE_CD at start of cleaning
if all_exhibit_rows and "CLAIM_TYPE_CD" in all_exhibit_rows[0]:
print(f"CLAIM_TYPE_CD at start of one_to_n_cleaning: {all_exhibit_rows[0]['CLAIM_TYPE_CD']} (type: {type(all_exhibit_rows[0]['CLAIM_TYPE_CD'])})")
################################ Crosswalk Fields ################################
all_exhibit_rows = aarete_derived.get_crosswalk_fields(all_exhibit_rows, constants)
# Debug: print CLAIM_TYPE_CD after crosswalk
if all_exhibit_rows and "CLAIM_TYPE_CD" in all_exhibit_rows[0]:
print(f"CLAIM_TYPE_CD after get_crosswalk_fields: {all_exhibit_rows[0]['CLAIM_TYPE_CD']} (type: {type(all_exhibit_rows[0]['CLAIM_TYPE_CD'])})")
################################ Determine LOB Relationship ################################
all_exhibit_rows = get_lob_relationship(all_exhibit_rows, exhibit_text, filename)
# Debug: print CLAIM_TYPE_CD after LOB relationship
if all_exhibit_rows and "CLAIM_TYPE_CD" in all_exhibit_rows[0]:
print(f"CLAIM_TYPE_CD after get_lob_relationship: {all_exhibit_rows[0]['CLAIM_TYPE_CD']} (type: {type(all_exhibit_rows[0]['CLAIM_TYPE_CD'])})")
################################ Fill NA Mapping ################################
all_exhibit_rows = aarete_derived.fill_na_mapping(all_exhibit_rows)
# Debug: print CLAIM_TYPE_CD after fill_na_mapping
if all_exhibit_rows and "CLAIM_TYPE_CD" in all_exhibit_rows[0]:
print(f"CLAIM_TYPE_CD after fill_na_mapping: {all_exhibit_rows[0]['CLAIM_TYPE_CD']} (type: {type(all_exhibit_rows[0]['CLAIM_TYPE_CD'])})")
################################ Split REIMB_DATES ################################
all_exhibit_rows = split_reimb_dates(all_exhibit_rows, filename)
# Debug: print CLAIM_TYPE_CD after split_reimb_dates
if all_exhibit_rows and "CLAIM_TYPE_CD" in all_exhibit_rows[0]:
print(f"CLAIM_TYPE_CD after split_reimb_dates: {all_exhibit_rows[0]['CLAIM_TYPE_CD']} (type: {type(all_exhibit_rows[0]['CLAIM_TYPE_CD'])})")
################################ Normalize Single-Value Fields to Strings ################################
# REIMB_TERM, SERVICE_TERM, and LOB_PROGRAM_RELATIONSHIP should always be strings (not lists)
@@ -826,10 +810,6 @@ def one_to_n_cleaning(
else:
answer_dict["LOB_PRODUCT_RELATIONSHIP"] = "Exclusive"
# Debug: print CLAIM_TYPE_CD at end of one_to_n_cleaning
if all_exhibit_rows and "CLAIM_TYPE_CD" in all_exhibit_rows[0]:
print(f"CLAIM_TYPE_CD at end of one_to_n_cleaning: {all_exhibit_rows[0]['CLAIM_TYPE_CD']} (type: {type(all_exhibit_rows[0]['CLAIM_TYPE_CD'])})")
return all_exhibit_rows
@@ -29,9 +29,6 @@ def combine_one_to_n(
if key not in combined_dict or string_utils.is_empty(
combined_dict.get(key)
):
# Debug: print CLAIM_TYPE_CD when it's being added from exhibit_level
if key == "CLAIM_TYPE_CD":
print(f"CLAIM_TYPE_CD in combine_one_to_n (from exhibit_level): {value} (type: {type(value)})")
combined_dict[key] = value
# Add exhibit text for contextual analysis (e.g., for bill type code determination)
combined_dict["EXHIBIT_TEXT"] = exhibit_text
@@ -484,11 +484,6 @@ def get_provider_info(
# Defensive programming for any json parsing errors
try:
providers = _parser(llm_answer_raw)
# Print raw LLM provider NAME values to debug format issues
print(f"Raw LLM provider info (parsed) on page {page_num}: {providers}")
for i, provider in enumerate(providers):
if "NAME" in provider:
print(f" Provider {i} NAME: {provider['NAME']} (type: {type(provider['NAME'])})")
logging.debug(f"Parsed provider info on page {page_num}: {providers}")
# Ensure we have a list of providers (not a dict or other type)
if isinstance(providers, dict):