Skip to content

Commit

Permalink
remove row-based validation error message (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
danlu1 authored May 1, 2024
1 parent 4c0f625 commit 776e8d9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions genie_registry/clinical.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ def _check_year_death_validity_message(
error = (
"Patient Clinical File: Please double check your YEAR_DEATH and YEAR_CONTACT columns. "
"YEAR_DEATH must be >= YEAR_CONTACT. "
f"There are {len(invalid_year_death_indices)} row(s) with YEAR_DEATH < YEAR_CONTACT. "
f"The row number(s) this occurs in are: {invalid_year_death_indices.tolist()}. Please correct.\n"
)
return error, warning

Expand Down Expand Up @@ -271,8 +269,6 @@ def _check_int_dod_validity_message(
error = (
"Patient Clinical File: Please double check your INT_DOD and INT_CONTACT columns. "
"INT_DOD must be >= INT_CONTACT. "
f"There are {len(invalid_int_dod_indices)} row(s) with INT_DOD < INT_CONTACT. "
f"The row number(s) this occurs in are: {invalid_int_dod_indices.tolist()}. Please correct.\n"
)
return error, warning

Expand Down
8 changes: 0 additions & 8 deletions tests/test_clinical.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,6 @@ def test_errors__validate(clin_class):
"'Unknown', 'Not Collected', 'Not Released', '>89', '<18'.\n"
"Patient Clinical File: Please double check your YEAR_DEATH "
"and YEAR_CONTACT columns. YEAR_DEATH must be >= YEAR_CONTACT. "
"There are 1 row(s) with YEAR_DEATH < YEAR_CONTACT. "
"The row number(s) this occurs in are: [4]. Please correct.\n"
"Patient Clinical File: Please double check your INT_CONTACT "
"column, it must be an integer, '>32485', '<6570', 'Unknown', "
"'Not Released' or 'Not Collected'.\n"
Expand All @@ -728,8 +726,6 @@ def test_errors__validate(clin_class):
"'Not Released' or 'Not Collected'.\n"
"Patient Clinical File: Please double check your INT_DOD "
"and INT_CONTACT columns. INT_DOD must be >= INT_CONTACT. "
"There are 1 row(s) with INT_DOD < INT_CONTACT. "
"The row number(s) this occurs in are: [2]. Please correct.\n"
"Patient: you have inconsistent redaction and text values in "
"YEAR_CONTACT, INT_CONTACT.\n"
"Patient: you have inconsistent redaction and text values in "
Expand Down Expand Up @@ -1147,8 +1143,6 @@ def test__check_year_death_validity(df, expected_indices):
pd.Index([2, 3]),
"Patient Clinical File: Please double check your YEAR_DEATH and YEAR_CONTACT columns. "
"YEAR_DEATH must be >= YEAR_CONTACT. "
"There are 2 row(s) with YEAR_DEATH < YEAR_CONTACT. "
"The row number(s) this occurs in are: [2, 3]. Please correct.\n",
),
],
ids=[
Expand Down Expand Up @@ -1226,8 +1220,6 @@ def test__check_int_dod_validity(df, expected_indices):
pd.Index([2, 3]),
"Patient Clinical File: Please double check your INT_DOD and INT_CONTACT columns. "
"INT_DOD must be >= INT_CONTACT. "
"There are 2 row(s) with INT_DOD < INT_CONTACT. "
"The row number(s) this occurs in are: [2, 3]. Please correct.\n",
),
],
ids=[
Expand Down

0 comments on commit 776e8d9

Please sign in to comment.