From 4642ddb6df4cff9025f26d3fa9f3bdd8002ea75a Mon Sep 17 00:00:00 2001 From: Karan Desai Date: Wed, 27 Nov 2024 20:34:13 +0000 Subject: [PATCH] Merged in bugfix/npi_hotfix (pull request #305) double filter for duplicates * double filter for duplicates Approved-by: Katon Minhas --- fieldExtraction/src/hotfix_helper_funcs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fieldExtraction/src/hotfix_helper_funcs.py b/fieldExtraction/src/hotfix_helper_funcs.py index a51384a..31795e3 100644 --- a/fieldExtraction/src/hotfix_helper_funcs.py +++ b/fieldExtraction/src/hotfix_helper_funcs.py @@ -328,7 +328,8 @@ def signature_page_npi(text_dict, page_list, matches): for page in page_list: if npi in text_dict[page] and 'signature' in text_dict[page]: npi_on_signature_page.append(npi) - + npi_on_signature_page = list(set(npi_on_signature_page)) + if len(npi_on_signature_page) == 1: npi = npi_on_signature_page[0] npi_other = [item for item in matches if item not in npi_on_signature_page]