Skip to content

Commit 04bac0b

Browse files
committed
Update generation guard to just check if BENE_HSTRY or CLM was provided
1 parent 4aaf8f9 commit 04bac0b

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

apps/bfd-model-idr/claims_generator.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
)
5959
from generator_util import (
6060
BENE_HSTRY,
61-
BENE_XREF,
6261
CLM,
6362
CLM_ANSI_SGNTR,
6463
CLM_DCMTN,
@@ -719,21 +718,8 @@ def generate(opts: OptionsModel, paths: tuple[Path, ...]):
719718

720719
out_tables: dict[str, list[RowAdapter]] = {k: [] for k in files}
721720

722-
# Naively check if the tables that make up CLAIM_ITEM, CLAIM_DATE_SIGNATURE, and BENEFICIARY
723-
# have been provided if CLAIM was provided. A thorough check would take too long due to the
724-
# volume of data
725-
clm_required_tables = [
726-
CLM_PROD,
727-
CLM_LINE,
728-
CLM_VAL,
729-
CLM_RLT_COND_SGNTR_MBR,
730-
BENE_HSTRY,
731-
BENE_XREF,
732-
]
733-
if any(CLM in str(file) for file in paths) and any(
734-
file not in clm_required_tables for file in paths
735-
):
736-
print(f"{', '.join(clm_required_tables)} must be provided if {CLM} is provided")
721+
if not files[BENE_HSTRY] and not files[CLM]:
722+
print(f"{BENE_HSTRY} and/or {CLM} must be provided for claims data generation to proceed")
737723
sys.exit(1)
738724

739725
cntrct_pbp_num, cntrct_pbp_cntct = gen_contract_plan(

0 commit comments

Comments
 (0)