Merged in bugfix/default_ind_postprocess (pull request #887)
Bugfix/default ind postprocess * Add logic to standardize UNIT_OF_MEASURE for flat-rate reimbursement methods - Implemented functionality in `standardize_reimb_method_and_fee_schedule` to set UNIT_OF_MEASURE to blank for rows where DEFAULT_IND is 'Y' and AARETE_DERIVED_REIMB_METHOD is 'flat rate'. - Added unit tests to verify behavior for various scenarios, including case insensitivity and non-default conditions. - Ensured that UNIT_OF_MEASURE remains unchanged for non-flat rate methods. * Enhance child rank handling and ensure column consistency in parent-child mapping - Added initialization for the `child_rank` column in both parents and children DataFrames to prevent KeyError during concatenation when no children exist. - Updated `cols_to_keep` in `parent_child_mapping` to filter out columns not present in `pc_df`, ensuring robustness in data processing. * Ran Black * made a small change in code_last_check, fixed so it returns string and not single char * Made changes to make sure that default_ind postprocess only happens to the cc output and not dashboard * Merged DEV into bugfix/default_ind_postprocess * Restore deleted AARETE_DERIVED_PAYER_NAME functions Functions were removed during previous commit. Restored from DEV to fix AttributeError in prompt_calls.py. * Simplify code_last_check return logic and add error logging - Simplified return to single line with fallback - Added error logging for failed LLM response parsing Approved-by: Siddhant Medar
This commit is contained in:
committed by
Siddhant Medar
parent
7571d3e3b1
commit
ddefa2ff30
@@ -489,11 +489,13 @@ def code_last_check(service, filename):
|
||||
)
|
||||
try:
|
||||
llm_answer_final = _parser(llm_answer_raw)
|
||||
return llm_answer_final[0]
|
||||
except:
|
||||
return llm_answer_final if llm_answer_final else "Generic"
|
||||
except Exception:
|
||||
logging.error(
|
||||
"Failed to parse LLM response in code_last_check: %s", llm_answer_raw
|
||||
)
|
||||
return "Generic"
|
||||
|
||||
|
||||
def fill_bill_type(
|
||||
service,
|
||||
answer_dict,
|
||||
|
||||
Reference in New Issue
Block a user