Files
doczyai-pipelines/fieldExtraction/scripts/investment_field_testing/testing.ipynb
T
Alex Galarce 04cb261831 Merged in feature/rework_reimb_id (pull request #467)
Rework reimbursement ID to associate parts of "lesser of" (or other such coupled statement) with one another

* refactor reimbursement ID generation with hashed service terms

* reduce hash length for unique reimbursement ID generation

* update reimbursement ID format to include 'exh_pg' for clarity

* clean up testing.ipynb

* one more formatting fix to testing.ipynb

* Move reimb_id generation to postprocessing

* move reimb_id function to postprocessing_funcs.py

* refactor generate_reimb_ids to group by FILE_NAME and EXHIBIT_PAGE for ID generation

* clean testing.ipynb further


Approved-by: Katon Minhas
2025-04-07 20:43:17 +00:00

103 lines
2.7 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Manual Test Bed\n",
"Runs contracts through from `input_data`\n",
"\n",
"To make this work: in `config.py`, change READ_MODE and RUN_MODE to 'local'.\n",
"Create an .env in the base directory of your project according to these instructions:\n",
"https://aarete.atlassian.net/wiki/spaces/DoczyAI/pages/1283751954/Using+.env+for+AWS+keys\n",
"\n",
"Feel free to comment out parts of `file_processing.py` that do not apply to the fields you are optimizing. For instance, if you're optimizing a smart chunked field, comment out the `one_to_n_fields` block and feed just `one_to_n_results` into `postprocess.postprocess`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"os.chdir(\"../../\") # go to FieldExtraction folder\n",
"TEST_DATA_INPUT_DIR = \"scripts/investment_field_testing/input_data\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Also change config.RUN_MODE and config.READ_MODE to 'local'\n",
"test_params = {}\n",
"test_params['local_input_dir'] = TEST_DATA_INPUT_DIR\n",
"test_params['max_workers'] = 1\n",
"test_params['input_files'] = [ # you can specify specific files to run here\n",
" \"00-125434-Central MS Diagnostic, LLC-ICMProviderAgreement_78285.txt\",\n",
" # \"20-2401676-Community Hospital of LaGrange County, Inc dba Parkview LaGrange Hospital-ICMProviderAgreement_89356_1.txt\",\n",
" ]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from src.investment.main import main as investment_main"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df_out, df_error = investment_main(testing=True, test_params=test_params)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df_out"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "doczy-smart-chunking-U_35LsVn-py3.12",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
}