Skip to content

Commit

Permalink
[PRMP-1354] - Historic names take into account Usual names (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadIqbalAD-NHS authored Dec 12, 2024
1 parent 9db1f78 commit 8bdeea0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lambdas/tests/unit/utils/test_lloyd_george_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def test_validate_name_with_wrong_first_name(mocker, mock_pds_patient):
validate_patient_name_using_full_name_history(
lg_file_patient_name, mock_pds_patient
)
assert mock_validate_name.call_count == 2
assert mock_validate_name.call_count == 3


def test_validate_name_with_wrong_family_name(mocker, mock_pds_patient):
Expand All @@ -344,7 +344,7 @@ def test_validate_name_with_wrong_family_name(mocker, mock_pds_patient):
validate_patient_name_using_full_name_history(
lg_file_patient_name, mock_pds_patient
)
assert mock_validate_name.call_count == 2
assert mock_validate_name.call_count == 3


def test_validate_name_with_historical_name(mocker, mock_pds_patient):
Expand Down
2 changes: 0 additions & 2 deletions lambdas/utils/lloyd_george_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ def validate_patient_name_using_full_name_history(
)

for name in pds_patient_details.name:
if name.use == "usual":
continue
historic_first_name_in_pds: str = name.given[0]
historic_family_name_in_pds = name.family
if validate_patient_name(
Expand Down

0 comments on commit 8bdeea0

Please sign in to comment.