diff --git a/fieldExtraction/src/constants/investment_columns.py b/fieldExtraction/src/constants/investment_columns.py index 9b49082..f598c1d 100644 --- a/fieldExtraction/src/constants/investment_columns.py +++ b/fieldExtraction/src/constants/investment_columns.py @@ -17,6 +17,8 @@ COLUMN_ORDER = [ "PROV_OTHER_NPI", "PROV_OTHER_NAME_FULL", "PROV_INFO_JSON", + "PROV_INFO_JSON_NEWLINE", + "PROV_INFO_JSON_PIPE", "AARETE_DERIVED_EFFECTIVE_DT", "TERMINATION_DT", "AARETE_DERIVED_TERMINATION_DT", diff --git a/fieldExtraction/src/investment/file_processing.py b/fieldExtraction/src/investment/file_processing.py index a9c35e8..9d5614b 100644 --- a/fieldExtraction/src/investment/file_processing.py +++ b/fieldExtraction/src/investment/file_processing.py @@ -78,6 +78,12 @@ def run_one_to_one_prompts(filename, contract_text, text_dict, top_sheet_dict, d regex_answers_dict = one_to_one_funcs.run_provider_info_fields(contract_text, text_dict, filename) one_to_one_results = {} one_to_one_results['PROV_INFO_JSON'] = json.dumps(regex_answers_dict) + ## Easier formatting for customers: + # Create newline-delimited version + one_to_one_results['PROV_INFO_JSON_NEWLINE'] = '\n'.join([json.dumps(provider) for provider in regex_answers_dict]) + # Create pipe-delimited version + one_to_one_results['PROV_INFO_JSON_PIPE'] = '|'.join([json.dumps(provider) for provider in regex_answers_dict]) + one_to_one_results = merge_provider_info(one_to_one_results, regex_answers_dict) # What if the TIN/NPI regexes don't find anything? Add PROV_GROUP_NAME_FULL to full context