From 8bdeea0ba9025acde28833765210220c3c0e5e69 Mon Sep 17 00:00:00 2001 From: MohammadIqbalAD-NHS <127403145+MohammadIqbalAD-NHS@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:19:37 +0000 Subject: [PATCH] [PRMP-1354] - Historic names take into account Usual names (#483) --- lambdas/tests/unit/utils/test_lloyd_george_validator.py | 4 ++-- lambdas/utils/lloyd_george_validator.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lambdas/tests/unit/utils/test_lloyd_george_validator.py b/lambdas/tests/unit/utils/test_lloyd_george_validator.py index f6ab44300..9019ae3b0 100644 --- a/lambdas/tests/unit/utils/test_lloyd_george_validator.py +++ b/lambdas/tests/unit/utils/test_lloyd_george_validator.py @@ -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): @@ -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): diff --git a/lambdas/utils/lloyd_george_validator.py b/lambdas/utils/lloyd_george_validator.py index 805696173..d44ff154c 100644 --- a/lambdas/utils/lloyd_george_validator.py +++ b/lambdas/utils/lloyd_george_validator.py @@ -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(