Merged in bugfix/effective_date_fix (pull request #504)
DRAFT: Bugfix/effective date fix * Merged in bugfix/extra-fields (pull request #500) Do not run Exhibit level prompt if there are no exhibit level fields * Do not run Exhibit level prompt if there are no exhibit level fields * Update dynamic test * Remove test from one-to-n test module * Update test * Fix unit test Approved-by: Alex Galarce * Merged in bugfix/tin-npi-prompt-fixes (pull request #499) Bugfix/tin npi prompt fixes * Change delimiter for other provider information from comma to pipe * filter out invalid providers * Update extraction and formatting instructions for provider entities in TIN_NPI_TEMPLATE * Merged main into bugfix/tin-npi-small-bugfixes * Refactor deduplication logic to use string_utils for checking empty provider fields * Merge branch 'bugfix/tin-npi-small-bugfixes' of https://bitbucket.org/aarete/doczy.ai into bugfix/tin-npi-small-bugfixes * Update deduplication logic to exclude providers with 'UNKNOWN' TIN, NPI, or NAME * Merge remote-tracking branch 'origin/main' into bugfix/tin-npi-small-bugfixes * Fix deduplication logic to not drop subsequent names * Fix formatting of provider names in deduplication logic * add payer name filtering * reorder execution order to allow to find payer_name first * Add handling for previously unfound group providers in identify_group_provider function * Merge remote-trackin… * Merged in feature/update-testbed-script (pull request #501) Feature/update testbed script * Update preprocessing * Update preprocessing * remove quit * Update date for filename * Merged main into feature/update-testbed-script Approved-by: Alex Galarce * Merged in bugfix/smart-chunks (pull request #503) missing of text in chunks fixed * missing of text in chunks fixed Approved-by: Katon Minhas * Merged in feature/rework-reimb-tin-npi (pull request #502) Feature/rework reimb tin npi * use LLM for reimb_[tin/npi/name] * Merge remote-tracking branch 'origin/main' into feature/rework-reimb-tin-npi * Merge remote-tracking branch 'origin/main' into feature/rework-reimb-tin-npi * deduplicate tin/name/npi before adding to prompt * Pull out prompt and llm_response in methodology_breakout_single_row for easier debugging * Refactor reimbursement_tin_npi to handle multiple providers and update valid TIN, NPI, and NAME fields accordingly * Reorder REIMB_PROV_NAME field in investment_prompts.json * Update REIMB_PROV_NAME prompt to specify valid values for provider names * Remove valid_values constraint from prov_name to raise accuracy * Remove debugging print statements from reimbursement_tin_npi and related functions * Remove debugging print statements from run_provider_info_fields function * Merge remote-tracking branch 'origin/main' into feature/rework-reimb-tin-npi * Remove debugging print statem… * Merged in feature/preformat-single-quotes-input (pull request #506) Replace double quotes with single quotes in context strings for parsability * Replace double quotes with single quotes in context strings for parsability * Merged main into feature/preformat-single-quotes-input Approved-by: Katon Minhas * updated sig pages fnxn * Merge branch 'main' into bugfix/effective_date_fix * poetry add pymupdf * created vision funcs * Merged main into bugfix/effective_date_fix * fixed pipeline issue * updated string_utils_test * updated test values * updated extract signature page fxn * updated test values * updated test values * Merged main into bugfix/effective_date_fix * Prompt template in all-caps * remove debugging prints * Merged main into bugfix/effective_date_fix * Change vision to False by default * Change vision to False by default * fix tests * fix tests Approved-by: Katon Minhas
This commit is contained in:
committed by
Katon Minhas
parent
806bd9b3bb
commit
0d6bdf9539
@@ -196,42 +196,42 @@ class TestStringUtils:
|
||||
assert result == expected
|
||||
|
||||
@pytest.mark.parametrize("text_dict, filename, expected", [
|
||||
(
|
||||
{"1": "This page has 2 signatures.", "2": "None here.", "3": "Signature of the party (but ignored)"},
|
||||
"test_file.txt",
|
||||
{"1": "This page has 2 signatures."}
|
||||
),
|
||||
(
|
||||
{"1": "No relevant content here.", "2": "Nor over here."},
|
||||
"test_file.txt",
|
||||
{}
|
||||
),
|
||||
(
|
||||
{"1": "This page has a signature.", "2": "Another signature is found here."},
|
||||
"test_file.txt",
|
||||
{"1": "This page has a signature.", "2": "Another signature is found here."}
|
||||
),
|
||||
(
|
||||
{"1": "This page has 1 signature.", "2": "No relevant content.", "3": "Signature block here. But ignored bc of the first textract-like page"},
|
||||
"test_file.txt",
|
||||
{"1": "This page has 1 signature."}
|
||||
),
|
||||
(
|
||||
{"1": "No signed names at all.", "2": "Just some random text."},
|
||||
"test_file.txt",
|
||||
{}
|
||||
),
|
||||
(
|
||||
{"1": "This page has a signature.", "2": "Signature is mentioned here too."},
|
||||
"test_file.txt",
|
||||
{"1": "This page has a signature.", "2": "Signature is mentioned here too."}
|
||||
),
|
||||
(
|
||||
{},
|
||||
"test_file.txt",
|
||||
{}
|
||||
),
|
||||
])
|
||||
(
|
||||
{"1": "This page has 2 signatures.", "2": "None here.", "3": "Signature of the party (but ignored)"},
|
||||
"test_file.txt",
|
||||
{"1": "This page has 2 signatures."}
|
||||
),
|
||||
(
|
||||
{"1": "No relevant content here.", "2": "Nor over here."},
|
||||
"test_file.txt",
|
||||
{}
|
||||
),
|
||||
(
|
||||
{"1": "This page has a signature.", "2": "signature page follow.","3": "Signature of the party (but ignored)"},
|
||||
"test_file.txt",
|
||||
{"2": "signature page follow.","3": "Signature of the party (but ignored)"}
|
||||
),
|
||||
(
|
||||
{"1": "This page has 1 signature.", "2": "No relevant content.", "3": "Signature block here. But ignored bc of the first textract-like page"},
|
||||
"test_file.txt",
|
||||
{"1": "This page has 1 signature."}
|
||||
),
|
||||
(
|
||||
{"1": "No signed names at all.", "2": "Just some random text."},
|
||||
"test_file.txt",
|
||||
{}
|
||||
),
|
||||
(
|
||||
{"1": "some random text", "2": "Signature authorization", "3": "Signature of the party"},
|
||||
"test_file.txt",
|
||||
{"2": "Signature authorization", "3": "Signature of the party"}
|
||||
),
|
||||
(
|
||||
{},
|
||||
"test_file.txt",
|
||||
{}
|
||||
),
|
||||
])
|
||||
def test_extract_signature_page(self, text_dict, filename, expected):
|
||||
result = extract_signature_page(text_dict, filename)
|
||||
assert result == expected
|
||||
|
||||
Reference in New Issue
Block a user