From 9d9cb033b0c2fce1bd51ad2053a5d24c8e15be04 Mon Sep 17 00:00:00 2001 From: abid-nhs Date: Thu, 31 Oct 2024 12:27:20 +0000 Subject: [PATCH] [PRMP-1065] - add row for successful - deceased total in ods reports and make tests pass accordingly (#456) --- lambdas/services/bulk_upload_report_service.py | 1 + .../data/bulk_upload/expected_ods_report_for_uploader_1.csv | 1 + .../data/bulk_upload/expected_ods_report_for_uploader_2.csv | 1 + lambdas/tests/unit/services/test_bulk_upload_report_service.py | 1 + 4 files changed, 4 insertions(+) diff --git a/lambdas/services/bulk_upload_report_service.py b/lambdas/services/bulk_upload_report_service.py index cb787f804..84919c390 100644 --- a/lambdas/services/bulk_upload_report_service.py +++ b/lambdas/services/bulk_upload_report_service.py @@ -89,6 +89,7 @@ def generate_individual_ods_report( total_successful=ods_report.get_total_successful_count(), total_registered_elsewhere=ods_report.get_total_registered_elsewhere_count(), total_suspended=ods_report.get_total_suspended_count(), + total_deceased=ods_report.get_total_deceased_count(), extra_rows=ods_report.get_unsuccessful_reasons_data_rows(), ) diff --git a/lambdas/tests/unit/helpers/data/bulk_upload/expected_ods_report_for_uploader_1.csv b/lambdas/tests/unit/helpers/data/bulk_upload/expected_ods_report_for_uploader_1.csv index 4a8c4a8be..82efacc95 100644 --- a/lambdas/tests/unit/helpers/data/bulk_upload/expected_ods_report_for_uploader_1.csv +++ b/lambdas/tests/unit/helpers/data/bulk_upload/expected_ods_report_for_uploader_1.csv @@ -2,5 +2,6 @@ Type,Description,Count Total,Total Successful,5 Total,Successful - Registered Elsewhere,1 Total,Successful - Suspended,1 +Total,Successful - Deceased,1 Reason,Could not find the given patient on PDS,2 Reason,Lloyd George file already exists,1 diff --git a/lambdas/tests/unit/helpers/data/bulk_upload/expected_ods_report_for_uploader_2.csv b/lambdas/tests/unit/helpers/data/bulk_upload/expected_ods_report_for_uploader_2.csv index 4a8c4a8be..82efacc95 100644 --- a/lambdas/tests/unit/helpers/data/bulk_upload/expected_ods_report_for_uploader_2.csv +++ b/lambdas/tests/unit/helpers/data/bulk_upload/expected_ods_report_for_uploader_2.csv @@ -2,5 +2,6 @@ Type,Description,Count Total,Total Successful,5 Total,Successful - Registered Elsewhere,1 Total,Successful - Suspended,1 +Total,Successful - Deceased,1 Reason,Could not find the given patient on PDS,2 Reason,Lloyd George file already exists,1 diff --git a/lambdas/tests/unit/services/test_bulk_upload_report_service.py b/lambdas/tests/unit/services/test_bulk_upload_report_service.py index 8fa071e59..17b566ace 100644 --- a/lambdas/tests/unit/services/test_bulk_upload_report_service.py +++ b/lambdas/tests/unit/services/test_bulk_upload_report_service.py @@ -360,6 +360,7 @@ def test_generate_individual_ods_report_creates_ods_report( total_successful=5, total_registered_elsewhere=1, total_suspended=1, + total_deceased=1, extra_rows=[ ["Reason", "Could not find the given patient on PDS", 2], ["Reason", "Lloyd George file already exists", 1],