Skip to content

Commit

Permalink
return index for rows with incorrect YEAR_DEATH info
Browse files Browse the repository at this point in the history
  • Loading branch information
danlu1 committed Apr 23, 2024
1 parent 53cc36d commit 52a7703
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions genie_registry/clinical.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def _check_year_death_validity(clinicaldf: pd.DataFrame) -> str:
"N/A",
temp["YEAR_DEATH"] >= temp["YEAR_CONTACT"],
)
index = [",".join(str(idx)) for idx, i in enumerate(check_result) if i == "False"]
if "False" in check_result:
error = "Patient Clinical File: Please double check your YEAR_DEATH and YEAR_CONTACT columns. YEAR_DEATH must be >= YEAR_CONTACT.\n"
return error
Expand Down

0 comments on commit 52a7703

Please sign in to comment.