Merged in bugfix/code-funcs (pull request #872)

Bugfix/code funcs

* Try-except code extraction

* Additional try-except for protection

* Black format


Approved-by: Praneel Panchigar
This commit is contained in:
Katon Minhas
2026-02-05 22:10:50 +00:00
parent 49407bfb93
commit c62bd1cd6a
3 changed files with 32 additions and 19 deletions
@@ -880,9 +880,7 @@ def fill_claim_type_from_title(df: pd.DataFrame) -> pd.DataFrame:
file_rows = df.loc[file_mask, "AARETE_DERIVED_CLAIM_TYPE_CD"]
# Get non-empty values for this file
non_empty_values = [
v for v in file_rows if not string_utils.is_empty(v)
]
non_empty_values = [v for v in file_rows if not string_utils.is_empty(v)]
if non_empty_values:
# Use mode (most common value) to fill empty rows in this file
@@ -934,7 +932,7 @@ def fill_claim_type_from_title(df: pd.DataFrame) -> pd.DataFrame:
"HOSPITAL",
"INSTITUTIONAL",
"FACILITY",
"INPATIENT",
"INPATIENT",
]
def infer_from_title(row):