diff --git a/src/pipelines/shared/extraction/one_to_n_funcs.py b/src/pipelines/shared/extraction/one_to_n_funcs.py index 7710b83..a4b204e 100644 --- a/src/pipelines/shared/extraction/one_to_n_funcs.py +++ b/src/pipelines/shared/extraction/one_to_n_funcs.py @@ -461,7 +461,7 @@ def methodology_breakout_secondary( def process_single_special_case_breakout(answer_dict, special_case_fields, filename): """Process a single special case breakout in parallel""" - term_field_name = [ + term_field_name_list = [ field_name for field_name in answer_dict.keys() if "_TERM" in field_name @@ -470,7 +470,11 @@ def process_single_special_case_breakout(answer_dict, special_case_fields, filen "SERVICE_TERM", "REIMB_TERM", ] - ][0] + ] + if term_field_name_list: + term_field_name = term_field_name_list[0] + else: + return answer_dict term_answer = answer_dict[term_field_name] term_field = special_case_fields.get_field(term_field_name) breakout_template = term_field.get_breakout_template() diff --git a/src/pipelines/shared/postprocessing/postprocessing_funcs.py b/src/pipelines/shared/postprocessing/postprocessing_funcs.py index d456f83..cd5111f 100644 --- a/src/pipelines/shared/postprocessing/postprocessing_funcs.py +++ b/src/pipelines/shared/postprocessing/postprocessing_funcs.py @@ -724,7 +724,7 @@ def update_grouper_base_rate_and_grouper_pct_rate(df): "AARETE_DERIVED_REIMB_METHOD", "REIMB_PCT_RATE", "REIMB_CONVERSION_FACTOR", - "GROUPER_TYPE" "GROUPER_CD", + "GROUPER_TYPE", "GROUPER_CD", ] # Check if all required columns exist