diff --git a/fieldExtraction/src/investment/test.py b/fieldExtraction/src/investment/test.py new file mode 100644 index 0000000..58b422f --- /dev/null +++ b/fieldExtraction/src/investment/test.py @@ -0,0 +1,59 @@ + + + +one_to_n_results = [{'SERVICE_TERM': 'Covered Services provided under the Medicaid and CHIP Products', 'REIMB_TERM': "lesser of the following amounts in effect for the Date of Service: (i) Provider's billed charges; or (ii) an amount equivalent to the Medicaid Fee-for-Service Program allowable payment rate as set forth by the State of Nevada ('Medicaid Rate')", 'LOB': 'Medicaid', 'PROGRAM': "Children's Health Insurance Program (CHIP)", 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'BASE_COVERED_SERVICES', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Billed Charges', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': '100', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services provided under the Medicaid and CHIP Products', 'REIMB_TERM': "lesser of the following amounts in effect for the Date of Service: (i) Provider's billed charges; or (ii) an amount equivalent to the Medicaid Fee-for-Service Program allowable payment rate as set forth by the State of Nevada ('Medicaid Rate')", 'LOB': 'Medicaid', 'PROGRAM': "Children's Health Insurance Program (CHIP)", 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'BASE_COVERED_SERVICES', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Fee Schedule', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': 'N/A', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'Medicaid Fee-for-Service Program allowable payment rate', 'AARETE_DERIVED_FEE_SCHEDULE': 'State', 'FEE_SCHEDULE_VERSION': 'in effect for the Date of Service', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'current'}, {'SERVICE_TERM': 'Covered Services where there is no Medicaid Rate under Medicaid and CHIP Products', 'REIMB_TERM': "thirty percent (30%) of Provider's billed charges, not to exceed seventy-five dollars ($75.00)", 'LOB': 'Medicaid', 'PROGRAM': "Children's Health Insurance Program (CHIP)", 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'DEFAULT_TERM', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'Y', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Billed Charges', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': 30, 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services where there is no Medicaid Rate under Medicaid and CHIP Products', 'REIMB_TERM': "thirty percent (30%) of Provider's billed charges, not to exceed seventy-five dollars ($75.00)", 'LOB': 'Medicaid', 'PROGRAM': "Children's Health Insurance Program (CHIP)", 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'DEFAULT_TERM', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'Y', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Flat Rate', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 75.0, 'REIMB_PCT_RATE': 'N/A', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services provided under the Medicare Advantage Product', 'REIMB_TERM': "lesser of the following amounts in effect for the Date of Service: (i) Provider's billed charges; or (ii) an amount equivalent to the Medicare Fee-for-Service Program allowable payment rate, geographically adjusted ('Medicare Rate')", 'LOB': 'N/A', 'PROGRAM': 'Medicare Advantage', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'BASE_COVERED_SERVICES', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Billed Charges', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': 100, 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services provided under the Medicare Advantage Product', 'REIMB_TERM': "lesser of the following amounts in effect for the Date of Service: (i) Provider's billed charges; or (ii) an amount equivalent to the Medicare Fee-for-Service Program allowable payment rate, geographically adjusted ('Medicare Rate')", 'LOB': 'N/A', 'PROGRAM': 'Medicare Advantage', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'BASE_COVERED_SERVICES', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Fee Schedule', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': 'N/A', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'Medicare Fee-for-Service Program allowable payment rate', 'AARETE_DERIVED_FEE_SCHEDULE': 'CMS', 'FEE_SCHEDULE_VERSION': 'in effect for the Date of Service', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'current'}, {'SERVICE_TERM': 'Covered Services where there is no Medicare Rate under Medicare Advantage Product', 'REIMB_TERM': "thirty percent (30%) of Provider's billed charges, not to exceed seventy-five dollars ($75.00)", 'LOB': 'N/A', 'PROGRAM': 'Medicare Advantage', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'DEFAULT_TERM', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'Y', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Billed Charges', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': 30, 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services where there is no Medicare Rate under Medicare Advantage Product', 'REIMB_TERM': "thirty percent (30%) of Provider's billed charges, not to exceed seventy-five dollars ($75.00)", 'LOB': 'N/A', 'PROGRAM': 'Medicare Advantage', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'DEFAULT_TERM', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'Y', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Flat Rate', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 75.0, 'REIMB_PCT_RATE': 'N/A', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services which are covered by or are primary to Medicare under the Medicare-Medicaid Program Product', 'REIMB_TERM': "lesser of Provider's billed charges or an amount equivalent to the Medicare Fee-for-Service Program allowable payment rate, geographically adjusted, ('Medicare Rate') and any portion, if any, that the Medicaid agency or Health Plan would have been responsible for paying if the Member was enrolled in the Medicare Fee-for-Service Program", 'LOB': 'Medicaid', 'PROGRAM': 'N/A', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'PAYMENT_CARVEOUT', 'CARVEOUT_IND': 'Y', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Billed Charges', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': '100', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services which are covered by or are primary to Medicare under the Medicare-Medicaid Program Product', 'REIMB_TERM': "lesser of Provider's billed charges or an amount equivalent to the Medicare Fee-for-Service Program allowable payment rate, geographically adjusted, ('Medicare Rate') and any portion, if any, that the Medicaid agency or Health Plan would have been responsible for paying if the Member was enrolled in the Medicare Fee-for-Service Program", 'LOB': 'Medicaid', 'PROGRAM': 'N/A', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'PAYMENT_CARVEOUT', 'CARVEOUT_IND': 'Y', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Fee Schedule', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': 'N/A', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'Medicare Fee-for-Service Program allowable payment rate', 'AARETE_DERIVED_FEE_SCHEDULE': 'CMS', 'FEE_SCHEDULE_VERSION': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'current'}, {'SERVICE_TERM': 'Covered Services which are covered by or are primary to Medicaid under the Medicare-Medicaid Program Product', 'REIMB_TERM': "lesser of Provider's billed charges or an amount equivalent to the Medicaid Fee-for-Service Program allowable payment rate as set forth by the State of Nevada ('Medicaid Rate')", 'LOB': 'Medicaid', 'PROGRAM': 'N/A', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'PAYMENT_CARVEOUT', 'CARVEOUT_IND': 'Y', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Billed Charges', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': '100', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services which are covered by or are primary to Medicaid under the Medicare-Medicaid Program Product', 'REIMB_TERM': "lesser of Provider's billed charges or an amount equivalent to the Medicaid Fee-for-Service Program allowable payment rate as set forth by the State of Nevada ('Medicaid Rate')", 'LOB': 'Medicaid', 'PROGRAM': 'N/A', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'PAYMENT_CARVEOUT', 'CARVEOUT_IND': 'Y', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Fee Schedule', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': 'N/A', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'Medicaid Fee-for-Service Program', 'AARETE_DERIVED_FEE_SCHEDULE': 'State', 'FEE_SCHEDULE_VERSION': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'current'}, {'SERVICE_TERM': 'Covered Services where there is no Medicaid Rate or Medicare Rate under Medicare-Medicaid Program Product', 'REIMB_TERM': "thirty percent (30%) of Provider's billed charges, not to exceed seventy-five dollars ($75.00)", 'LOB': 'Medicaid', 'PROGRAM': 'N/A', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'DEFAULT_TERM', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'Y', 'DEFAULT_TERM_TERMS': "thirty percent (30%) of Provider's billed charges, not to exceed seventy-five dollars ($75.00)", 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Billed Charges', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': '30', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'DISCOUNT_PERCENT_RATE': 'N/A', 'DISCOUNT_RATE_CHANGE_INTERVAL': 'N/A', 'DISCOUNT_START_DT': 'N/A', 'DISCOUNT_END_DT': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services where there is no Medicaid Rate or Medicare Rate under Medicare-Medicaid Program Product', 'REIMB_TERM': "thirty percent (30%) of Provider's billed charges, not to exceed seventy-five dollars ($75.00)", 'LOB': 'Medicaid', 'PROGRAM': 'N/A', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'DEFAULT_TERM', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'Y', 'DEFAULT_TERM_TERMS': "thirty percent (30%) of Provider's billed charges, not to exceed seventy-five dollars ($75.00)", 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Flat Rate', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': '75.00', 'REIMB_PCT_RATE': 'N/A', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'DISCOUNT_PERCENT_RATE': 'N/A', 'DISCOUNT_RATE_CHANGE_INTERVAL': 'N/A', 'DISCOUNT_START_DT': 'N/A', 'DISCOUNT_END_DT': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services provided under the Health Insurance Marketplace Product', 'REIMB_TERM': "lesser of the following amounts in effect for the Date of Service: (i) Provider's billed charges; or (ii) one hundred percent (100%) of the 2021 Medicare fee schedule, which does not include geographic adjustment ('Marketplace Medicare Rate')", 'LOB': 'Marketplace', 'PROGRAM': 'N/A', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'BASE_COVERED_SERVICES', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Billed Charges', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': '100', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services provided under the Health Insurance Marketplace Product', 'REIMB_TERM': "lesser of the following amounts in effect for the Date of Service: (i) Provider's billed charges; or (ii) one hundred percent (100%) of the 2021 Medicare fee schedule, which does not include geographic adjustment ('Marketplace Medicare Rate')", 'LOB': 'Marketplace', 'PROGRAM': 'N/A', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'BASE_COVERED_SERVICES', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Fee Schedule', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': '100', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': '2021 Medicare fee schedule', 'AARETE_DERIVED_FEE_SCHEDULE': 'CMS', 'FEE_SCHEDULE_VERSION': '2021', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': '2021'}, {'SERVICE_TERM': 'Covered Services where there is no Marketplace Medicare Rate under Health Insurance Marketplace Product', 'REIMB_TERM': "thirty percent (30%) of Provider's billed charges, not to exceed seventy-five dollars ($75.00)", 'LOB': 'Marketplace', 'PROGRAM': 'N/A', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'DEFAULT_TERM', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'Y', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Billed Charges', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': 30, 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}, {'SERVICE_TERM': 'Covered Services where there is no Marketplace Medicare Rate under Health Insurance Marketplace Product', 'REIMB_TERM': "thirty percent (30%) of Provider's billed charges, not to exceed seventy-five dollars ($75.00)", 'LOB': 'Marketplace', 'PROGRAM': 'N/A', 'PLACE_OF_SERVICE_CD_DESC': 'N/A', 'BILL_TYPE_CD_DESC': 'N/A', 'CARVEOUT_CD': 'DEFAULT_TERM', 'CARVEOUT_IND': 'N', 'DEFAULT_IND': 'Y', 'LESSER_OF_IND': 'Y', 'AARETE_DERIVED_REIMB_METHOD': 'Flat Rate', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 75.0, 'REIMB_PCT_RATE': 'N/A', 'REIMB_CONVERSION_FACTOR': 'N/A', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}] + +import src.investment.aarete_derived as aarete_derived +import src.investment.postprocessing_funcs as postprocessing_funcs +import src.investment.dynamic_funcs as dynamic_funcs +import src.investment.one_to_n_funcs as one_to_n_funcs +import src.investment.file_processing as file_processing +import src.utils.io_utils as io_utils +from constants.constants import Constants +import src.investment.preprocess as preprocess +import src.investment.row_funcs as row_funcs +filename = "" +import pandas as pd + + +################## Crosswalk Fields ################## +one_to_n_results = aarete_derived.get_crosswalk_fields(one_to_n_results) + +################## Fill NA Mapping ################## +one_to_n_results = aarete_derived.fill_na_mapping(one_to_n_results) + +################## Update LOB for Duals ################## +one_to_n_results = postprocessing_funcs.update_lob_for_duals(one_to_n_results) + +################## Add N/A Dynamic or Exhibit to One-to-One ################## +dynamic_one_to_one_fields = dynamic_funcs.get_dynamic_one_to_one_fields(one_to_n_results) +print(dynamic_one_to_one_fields) + +################### Split REIMB_DATES ################## +one_to_n_results = one_to_n_funcs.split_reimb_dates(one_to_n_results, filename) + +################## CONVERT TO DF ################## +one_to_n_df = pd.DataFrame(one_to_n_results) + +input_dict = io_utils.read_input() + +constants = Constants() + +# Get contract text from the input dictionary +contract_text = list(input_dict.values())[0] + +contract_text = preprocess.clean_text(contract_text) +text_dict, top_sheet_dict = preprocess.split_text(contract_text) + +one_to_one_results = file_processing.run_one_to_one_prompts( + filename, contract_text, text_dict, top_sheet_dict, dynamic_one_to_one_fields, constants + ) # Return dict +one_to_one_results["FILE_NAME"] = filename + + +merged_results = row_funcs.merge_one_to_one_into_one_to_n( + one_to_n_df, one_to_one_results, constants +) + +print(merged_results.to_csv("test_results.csv")) +