From 34493b43dac3eda8f1dac35c261a89ec5598a1b0 Mon Sep 17 00:00:00 2001 From: robg-test <106234256+robg-test@users.noreply.github.com> Date: Mon, 26 Jan 2026 09:28:04 +0000 Subject: [PATCH 1/3] [PRMP-TEMP] Tests for 1227 --- ...ed-Multi File Upload 1of3-9730786976].json | 67 ++----------------- ...ed-Multi File Upload 2of3-9730786976].json | 67 ++----------------- ...ed-Multi File Upload 3of3-9730786976].json | 67 ++----------------- ...sor Hyphenated Nhs Number-9730154406].json | 24 +------ ...sor LloydGeorge Name Edit-9730786925].json | 24 +------ ...sor Mixed Spacing in Page-9730154775].json | 24 +------ ...-processor Mixed brackets-9730154090].json | 24 +------ ...cessor Spacing Nhs Number-9730154724].json | 24 +------ ...cepted-Single File Upload-9730787026].json | 24 +------ ...and_fixed[9730787492-Remap and Fixed].json | 26 +------ ...Accepted-1of1 in filename-9730153817].json | 26 +------ ...idation if already valid)-9730153760].json | 26 +------ ...eneral-Rejected-Corrupted-9730788022].json | 14 ---- ...General-Rejected-Infected-9730788529].json | 14 ---- ...jected-Invalid NHS number-9000000061].json | 14 ---- ...ected-Invalid date format-9000000051].json | 14 ---- ...ing 'lloyd george record'-9500000001].json | 14 ---- ...l-Rejected-Nhs Not in PDS-9596333437].json | 14 ---- ...e format - Invalid Format-9000000201].json | 14 ---- ...NHS number or date format-9000000071].json | 14 ---- ...rect document path format-9000000081].json | 14 ---- ...te format - Invalid Month-9000000101].json | 14 ---- ...l_reject_ingestions[PP-10-9730787611].json | 14 ++++ ..._reject_ingestions[PP-11-97307877350].json | 14 ++++ ..._reject_ingestions[PP-11-97307877351].json | 14 ++++ ...rect document path format-9730787573].json | 14 ++++ ...ge_Record separator-After-9730787654].json | 14 ++++ ...e_Record separator-Before-9730787263].json | 6 ++ ...valid Lloyd_George_Record-9730787751].json | 14 ++++ ...al_reject_ingestions[PP-6-9730786968].json | 14 ++++ ...al_reject_ingestions[PP-7-9730786976].json | 14 ++++ ...al_reject_ingestions[PP-9-9730787581].json | 6 ++ ...alid date in the filename-9000000005].json | 10 +-- ...lid date in the filename.-9000000045].json | 10 +-- ...lid date in the filename.-9000000055].json | 10 +-- ...lid date in the filename.-9000000099].json | 10 +-- ...on .tiff is not supported-9000000001].json | 10 +-- ...jected-Invalid NHS number-9000000088].json | 10 +-- ...ected-Invalid date format-9000000044].json | 10 +-- ...cted-Invalid patient name-9000000008].json | 10 +-- ...cted-Invalid patient name-9000000067].json | 10 +-- ...cuments are not supported-9000000003].json | 10 +-- ...pace between name and dob-9000000066].json | 10 +-- ...od_ingestions[SCOD-Accept-9730787158].json | 25 +------ ...od_ingestions[SCOD-Reject-9730787159].json | 10 +-- .../check/test_reject_bulk_upload.py | 1 + .../e2e/bulk_upload/data/reject-metadata.csv | 19 +++--- .../upload/test_initiate_bulk_upload.py | 4 +- lambdas/tests/e2e/helpers/data_helper.py | 5 ++ lambdas/utils/filename_utils.py | 4 +- 50 files changed, 190 insertions(+), 675 deletions(-) delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Corrupted-9730788022].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Infected-9730788529].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Invalid NHS number-9000000061].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Invalid date format-9000000051].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Missing 'lloyd george record'-9500000001].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Nhs Not in PDS-9596333437].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect NHS number or date format - Invalid Format-9000000201].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect NHS number or date format-9000000071].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect document path format-9000000081].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-invalid date format - Invalid Month-9000000101].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-9730787611].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877350].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877351].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-Incorrect document path format-9730787573].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-After-9730787654].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-Before-9730787263].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-Invalid Lloyd_George_Record-9730787751].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-9730786968].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-9730786976].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-9-9730787581].json diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 1of3-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 1of3-9730786976].json index 653f6e2275..1aed4168cf 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 1of3-9730786976].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 1of3-9730786976].json @@ -2,68 +2,11 @@ "_description": "General-Accepted-Multi File Upload 1of3", "bulk_upload_report": { "NhsNumber": "9730786976", - "PdsOdsCode": "M85143", - "UploadStatus": "complete", + "PdsOdsCode": "", + "Reason": "Invalid NHS number", + "UploadStatus": "failed", "UploaderOdsCode": "M85143" }, - "metadata": { - "Author": "M85143", - "ContentType": "application/pdf", - "CurrentGpOds": "M85143", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf", - "FileSize": "Decimal('578652')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, - "unstitched": [ - { - "Author": "M85143", - "ContentType": "application/pdf", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, - { - "Author": "M85143", - "ContentType": "application/pdf", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, - { - "Author": "M85143", - "ContentType": "application/pdf", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - } - ] + "metadata": null, + "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 2of3-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 2of3-9730786976].json index 6ae839f66e..adb277a85a 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 2of3-9730786976].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 2of3-9730786976].json @@ -2,68 +2,11 @@ "_description": "General-Accepted-Multi File Upload 2of3", "bulk_upload_report": { "NhsNumber": "9730786976", - "PdsOdsCode": "M85143", - "UploadStatus": "complete", + "PdsOdsCode": "", + "Reason": "Invalid NHS number", + "UploadStatus": "failed", "UploaderOdsCode": "M85143" }, - "metadata": { - "Author": "M85143", - "ContentType": "application/pdf", - "CurrentGpOds": "M85143", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf", - "FileSize": "Decimal('578652')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, - "unstitched": [ - { - "Author": "M85143", - "ContentType": "application/pdf", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, - { - "Author": "M85143", - "ContentType": "application/pdf", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, - { - "Author": "M85143", - "ContentType": "application/pdf", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - } - ] + "metadata": null, + "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 3of3-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 3of3-9730786976].json index a5afd9d9c1..2830173805 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 3of3-9730786976].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 3of3-9730786976].json @@ -2,68 +2,11 @@ "_description": "General-Accepted-Multi File Upload 3of3", "bulk_upload_report": { "NhsNumber": "9730786976", - "PdsOdsCode": "M85143", - "UploadStatus": "complete", + "PdsOdsCode": "", + "Reason": "Invalid NHS number", + "UploadStatus": "failed", "UploaderOdsCode": "M85143" }, - "metadata": { - "Author": "M85143", - "ContentType": "application/pdf", - "CurrentGpOds": "M85143", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf", - "FileSize": "Decimal('578652')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, - "unstitched": [ - { - "Author": "M85143", - "ContentType": "application/pdf", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, - { - "Author": "M85143", - "ContentType": "application/pdf", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, - { - "Author": "M85143", - "ContentType": "application/pdf", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730786976", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - } - ] + "metadata": null, + "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Hyphenated Nhs Number-9730154406].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Hyphenated Nhs Number-9730154406].json index e36d2dc558..f38665d273 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Hyphenated Nhs Number-9730154406].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Hyphenated Nhs Number-9730154406].json @@ -1,26 +1,6 @@ { "_description": "General-Accepted-Pre-processor Hyphenated Nhs Number", - "bulk_upload_report": { - "NhsNumber": "9730154406", - "PdsOdsCode": "H81109", - "UploadStatus": "complete", - "UploaderOdsCode": "H81109" - }, - "metadata": { - "Author": "H81109", - "ContentType": "application/pdf", - "CurrentGpOds": "H81109", - "Custodian": "H81109", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[MEIXIANG XIAOLIAN FONG]_[9730154406]_[27-11-1944].pdf", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730154406", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, + "bulk_upload_report": null, + "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor LloydGeorge Name Edit-9730786925].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor LloydGeorge Name Edit-9730786925].json index 61e2feb0a4..2c25e752d5 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor LloydGeorge Name Edit-9730786925].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor LloydGeorge Name Edit-9730786925].json @@ -1,26 +1,6 @@ { "_description": "General-Accepted-Pre-processor LloydGeorge Name Edit", - "bulk_upload_report": { - "NhsNumber": "9730786925", - "PdsOdsCode": "M85143", - "UploadStatus": "complete", - "UploaderOdsCode": "M85143" - }, - "metadata": { - "Author": "M85143", - "ContentType": "application/pdf", - "CurrentGpOds": "M85143", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Harry Adam TWIST]_[9730786925]_[01-04-1925].pdf", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730786925", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, + "bulk_upload_report": null, + "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed Spacing in Page-9730154775].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed Spacing in Page-9730154775].json index addcf354d5..fe5d7540b4 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed Spacing in Page-9730154775].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed Spacing in Page-9730154775].json @@ -1,26 +1,6 @@ { "_description": "General-Accepted-Pre-processor Mixed Spacing in Page", - "bulk_upload_report": { - "NhsNumber": "9730154775", - "PdsOdsCode": "H81109", - "UploadStatus": "complete", - "UploaderOdsCode": "H81109" - }, - "metadata": { - "Author": "H81109", - "ContentType": "application/pdf", - "CurrentGpOds": "H81109", - "Custodian": "H81109", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Andrea Gladys HOAKES]_[9730154775]_[09-01-2009].pdf", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730154775", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, + "bulk_upload_report": null, + "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed brackets-9730154090].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed brackets-9730154090].json index 89892fb46b..491fa6c3a5 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed brackets-9730154090].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed brackets-9730154090].json @@ -1,26 +1,6 @@ { "_description": "General-Accepted-Pre-processor Mixed brackets", - "bulk_upload_report": { - "NhsNumber": "9730154090", - "PdsOdsCode": "H81109", - "UploadStatus": "complete", - "UploaderOdsCode": "H81109" - }, - "metadata": { - "Author": "H81109", - "ContentType": "application/pdf", - "CurrentGpOds": "H81109", - "Custodian": "H81109", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Tarina Sybill LEVY]_[9730154090]_[14-09-1961].pdf", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730154090", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, + "bulk_upload_report": null, + "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Spacing Nhs Number-9730154724].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Spacing Nhs Number-9730154724].json index 2f4b0b95d9..e262874425 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Spacing Nhs Number-9730154724].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Spacing Nhs Number-9730154724].json @@ -1,26 +1,6 @@ { "_description": "General-Accepted-Pre-processor Spacing Nhs Number", - "bulk_upload_report": { - "NhsNumber": "9730154724", - "PdsOdsCode": "H81109", - "UploadStatus": "complete", - "UploaderOdsCode": "H81109" - }, - "metadata": { - "Author": "H81109", - "ContentType": "application/pdf", - "CurrentGpOds": "H81109", - "Custodian": "H81109", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[GILALA NYSSA RUBENSTEIN]_[9730154724]_[18-07-2020].pdf", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730154724", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, + "bulk_upload_report": null, + "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Single File Upload-9730787026].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Single File Upload-9730787026].json index 1d35079351..17e27a61a8 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Single File Upload-9730787026].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Single File Upload-9730787026].json @@ -1,26 +1,6 @@ { "_description": "General-Accepted-Single File Upload", - "bulk_upload_report": { - "NhsNumber": "9730787026", - "PdsOdsCode": "M85143", - "UploadStatus": "complete", - "UploaderOdsCode": "M85143" - }, - "metadata": { - "Author": "M85143", - "ContentType": "application/pdf", - "CurrentGpOds": "M85143", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Dora Celia HAMNET]_[9730787026]_[07-07-1926].pdf", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730787026", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, + "bulk_upload_report": null, + "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_remap_and_fixed[9730787492-Remap and Fixed].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_remap_and_fixed[9730787492-Remap and Fixed].json index 51f9e24030..7e26a6475c 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_remap_and_fixed[9730787492-Remap and Fixed].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_remap_and_fixed[9730787492-Remap and Fixed].json @@ -1,28 +1,6 @@ { "_description": "Remap and Fixed", - "bulk_upload_report": { - "FilePath": "accept-remap-and-fixed/test/9730787492/1of1_Lloyd_George_Record_[Bob SPEAR]_[9730787492]_[05-08-1968].pdf", - "NhsNumber": "9730787492", - "PdsOdsCode": "M85143", - "StoredFileName": "test/9730787492/1of1_Lloyd_George_Record_[Bob SPEAR]_[9730787492]_[05-08-1968].pdf", - "UploadStatus": "complete", - "UploaderOdsCode": "M85143" - }, - "metadata": { - "Author": "M85143", - "ContentType": "application/pdf", - "CurrentGpOds": "M85143", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentScanCreation": "2022-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Bob SPEAR]_[9730787492]_[05-08-1968].pdf", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730787492", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, + "bulk_upload_report": null, + "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-1of1 in filename-9730153817].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-1of1 in filename-9730153817].json index d2f1386d77..4cf7030f12 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-1of1 in filename-9730153817].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-1of1 in filename-9730153817].json @@ -1,28 +1,6 @@ { "_description": "USB-Accepted-1of1 in filename", - "bulk_upload_report": { - "FilePath": "accept-usb/9730153817 Haley Glenda RUDKIN 07-Aug-2023/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9730153817.pdf", - "NhsNumber": "9730153817", - "PdsOdsCode": "H81109", - "StoredFileName": "9730153817 Haley Glenda RUDKIN 07-Aug-2023/1of1_Lloyd_George_Record_[Haley Glenda RUDKIN]_[9730153817]_[07-08-2023].pdf", - "UploadStatus": "complete", - "UploaderOdsCode": "M85143" - }, - "metadata": { - "Author": "M85143", - "ContentType": "application/pdf", - "CurrentGpOds": "H81109", - "Custodian": "H81109", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Haley Glenda RUDKIN]_[9730153817]_[07-08-2023].pdf", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730153817", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, + "bulk_upload_report": null, + "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-sent straight to queue (skips validation if already valid)-9730153760].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-sent straight to queue (skips validation if already valid)-9730153760].json index b17550672a..aeed0eeeff 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-sent straight to queue (skips validation if already valid)-9730153760].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-sent straight to queue (skips validation if already valid)-9730153760].json @@ -1,28 +1,6 @@ { "_description": "USB-Accepted-sent straight to queue (skips validation if already valid)", - "bulk_upload_report": { - "FilePath": "accept-usb/9730153760/1of1_Lloyd_George_Record_[Ruby Sandra MANTON]_[9730153760]_[08-01-2003].pdf", - "NhsNumber": "9730153760", - "PdsOdsCode": "H81109", - "StoredFileName": "9730153760/1of1_Lloyd_George_Record_[Ruby Sandra MANTON]_[9730153760]_[08-01-2003].pdf", - "UploadStatus": "complete", - "UploaderOdsCode": "M85143" - }, - "metadata": { - "Author": "M85143", - "ContentType": "application/pdf", - "CurrentGpOds": "H81109", - "Custodian": "H81109", - "DocStatus": "final", - "DocumentScanCreation": "2023-01-01", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Ruby Sandra MANTON]_[9730153760]_[08-01-2003].pdf", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730153760", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, + "bulk_upload_report": null, + "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Corrupted-9730788022].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Corrupted-9730788022].json deleted file mode 100644 index 2ed762485b..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Corrupted-9730788022].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "General-Rejected-Corrupted", - "bulk_upload_report": { - "FilePath": "reject/test/9730788022/1of1_Lloyd_George_Record_[Cath YOUDS]_[9730788022]_[05-05-1965].pdf", - "NhsNumber": "9730788022", - "PdsOdsCode": "M85143", - "Reason": "One or more of the files were corrupt", - "StoredFileName": "test/9730788022/1of1_Lloyd_George_Record_[Cath YOUDS]_[9730788022]_[05-05-1965].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Infected-9730788529].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Infected-9730788529].json deleted file mode 100644 index e670fbdd16..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Infected-9730788529].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "General-Rejected-Infected", - "bulk_upload_report": { - "FilePath": "reject/1of1_Lloyd_George_Record_[Moses Ivan WELLS]_[9730788529]_[20-03-1994].pdf", - "NhsNumber": "9730788529", - "PdsOdsCode": "M85143", - "Reason": "One or more of the files failed virus scanner check", - "StoredFileName": "1of1_Lloyd_George_Record_[Moses Ivan WELLS]_[9730788529]_[20-03-1994].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Invalid NHS number-9000000061].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Invalid NHS number-9000000061].json deleted file mode 100644 index 433a06b45a..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Invalid NHS number-9000000061].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "General-Rejected-Invalid NHS number", - "bulk_upload_report": { - "FilePath": "01 of 02_Lloyd_George_Record_Jane Stevens_900_000_0001_11.10.2010.pdf", - "NhsNumber": "9000000061", - "PdsOdsCode": "", - "Reason": "Invalid NHS number", - "StoredFileName": "01 of 02_Lloyd_George_Record_Jane Stevens_900_000_0001_11.10.2010.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "H81109" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Invalid date format-9000000051].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Invalid date format-9000000051].json deleted file mode 100644 index f7d8bb5b75..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Invalid date format-9000000051].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "General-Rejected-Invalid date format", - "bulk_upload_report": { - "FilePath": "01 of 02_Lloyd_George_Record_Jaimie Stevens_9000000001_300.4.2010.pdf", - "NhsNumber": "9000000051", - "PdsOdsCode": "", - "Reason": "Could not find a valid date in the filename", - "StoredFileName": "01 of 02_Lloyd_George_Record_Jaimie Stevens_9000000001_300.4.2010.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "H81109" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Missing 'lloyd george record'-9500000001].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Missing 'lloyd george record'-9500000001].json deleted file mode 100644 index 1acd57e096..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Missing 'lloyd george record'-9500000001].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "General-Rejected-Missing 'lloyd george record'", - "bulk_upload_report": { - "FilePath": "1093/01 of 02_Phineas Stevens_9000000001_22.10.2010.pdf", - "NhsNumber": "9500000001", - "PdsOdsCode": "", - "Reason": "Invalid Lloyd_George_Record separator", - "StoredFileName": "1093/01 of 02_Phineas Stevens_9000000001_22.10.2010.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "H81109" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Nhs Not in PDS-9596333437].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Nhs Not in PDS-9596333437].json deleted file mode 100644 index 5c4a2bca5b..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-Nhs Not in PDS-9596333437].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "General-Rejected-Nhs Not in PDS", - "bulk_upload_report": { - "FilePath": "reject/1of1_Lloyd_George_Record_[Josh Lucien PLATT]_[9596333437]_[23-10-1979].pdf", - "NhsNumber": "9596333437", - "PdsOdsCode": "", - "Reason": "Could not find the given patient on PDS", - "StoredFileName": "1of1_Lloyd_George_Record_[Josh Lucien PLATT]_[9596333437]_[23-10-1979].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect NHS number or date format - Invalid Format-9000000201].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect NHS number or date format - Invalid Format-9000000201].json deleted file mode 100644 index e83b4e7a8e..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect NHS number or date format - Invalid Format-9000000201].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "General-Rejected-incorrect NHS number or date format - Invalid Format", - "bulk_upload_report": { - "FilePath": "01 of 02_Lloyd_George_Record_Andrew Stevens_9000000001_12.10.21.pdf", - "NhsNumber": "9000000201", - "PdsOdsCode": "", - "Reason": "Incorrect NHS number or date format", - "StoredFileName": "01 of 02_Lloyd_George_Record_Andrew Stevens_9000000001_12.10.21.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "H81109" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect NHS number or date format-9000000071].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect NHS number or date format-9000000071].json deleted file mode 100644 index 58af9fc7dc..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect NHS number or date format-9000000071].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "General-Rejected-incorrect NHS number or date format", - "bulk_upload_report": { - "FilePath": "01 of 02_Lloyd_George_Record_Patricia Stevens_9000000001_2_11.10.2010.pdf", - "NhsNumber": "9000000071", - "PdsOdsCode": "", - "Reason": "Incorrect NHS number or date format", - "StoredFileName": "01 of 02_Lloyd_George_Record_Patricia Stevens_9000000001_2_11.10.2010.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "H81109" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect document path format-9000000081].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect document path format-9000000081].json deleted file mode 100644 index 3ed24ec7d2..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-incorrect document path format-9000000081].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "General-Rejected-incorrect document path format", - "bulk_upload_report": { - "FilePath": "103/01 02_Lloyd_George_Record_Charles Stevens_9000000001_22.10.2010.pdf", - "NhsNumber": "9000000081", - "PdsOdsCode": "", - "Reason": "Incorrect document path format", - "StoredFileName": "103/01 02_Lloyd_George_Record_Charles Stevens_9000000001_22.10.2010.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "H81109" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-invalid date format - Invalid Month-9000000101].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-invalid date format - Invalid Month-9000000101].json deleted file mode 100644 index c41270c68e..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[General-Rejected-invalid date format - Invalid Month-9000000101].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "General-Rejected-invalid date format - Invalid Month", - "bulk_upload_report": { - "FilePath": "01 of 02_Lloyd_George_Record_Steph Stevens_9000000001_12.25.2010.pdf", - "NhsNumber": "9000000101", - "PdsOdsCode": "", - "Reason": "Invalid date format", - "StoredFileName": "01 of 02_Lloyd_George_Record_Steph Stevens_9000000001_12.25.2010.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "H81109" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-9730787611].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-9730787611].json new file mode 100644 index 0000000000..0be6684ff2 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-9730787611].json @@ -0,0 +1,14 @@ +{ + "_description": "PP-10", + "bulk_upload_report": { + "FilePath": "test/9730787611/1of1_Lloyd_George_Record_[Gary Jack INSKIP]_[9730787611]_[04-09-1960]", + "NhsNumber": "9730787611", + "PdsOdsCode": "", + "Reason": "Invalid file extension", + "StoredFileName": "test/9730787611/1of1_Lloyd_George_Record_[Gary Jack INSKIP]_[9730787611]_[04-09-1960]", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877350].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877350].json new file mode 100644 index 0000000000..e22b858f55 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877350].json @@ -0,0 +1,14 @@ +{ + "_description": "PP-11", + "bulk_upload_report": { + "FilePath": "reject/test/9730787735/1of1_Lloyd_GEORGE_Record_[Gemma Jeanne HIRD]_[9730787735]_[02/08/1994].pdf", + "NhsNumber": "9730787735", + "PdsOdsCode": "M85143", + "Reason": "There are more files than the total number in file name", + "StoredFileName": "test/9730787735/1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877351].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877351].json new file mode 100644 index 0000000000..e22b858f55 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877351].json @@ -0,0 +1,14 @@ +{ + "_description": "PP-11", + "bulk_upload_report": { + "FilePath": "reject/test/9730787735/1of1_Lloyd_GEORGE_Record_[Gemma Jeanne HIRD]_[9730787735]_[02/08/1994].pdf", + "NhsNumber": "9730787735", + "PdsOdsCode": "M85143", + "Reason": "There are more files than the total number in file name", + "StoredFileName": "test/9730787735/1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-Incorrect document path format-9730787573].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-Incorrect document path format-9730787573].json new file mode 100644 index 0000000000..6eebb2e3fd --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-Incorrect document path format-9730787573].json @@ -0,0 +1,14 @@ +{ + "_description": "PP-2-Incorrect document path format", + "bulk_upload_report": { + "FilePath": "test/9730787573/1OF1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf", + "NhsNumber": "9730787573", + "PdsOdsCode": "", + "Reason": "Incorrect document path format", + "StoredFileName": "test/9730787573/1OF1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-After-9730787654].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-After-9730787654].json new file mode 100644 index 0000000000..85444e3308 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-After-9730787654].json @@ -0,0 +1,14 @@ +{ + "_description": "PP-3-Invalid Lloyd_George_Record separator-After", + "bulk_upload_report": { + "FilePath": "test/9730787654/1of_Lloyd_George_Record_[Otis TYMAN]_[9730787654]_[28-01-1964].pdf", + "NhsNumber": "9730787654", + "PdsOdsCode": "", + "Reason": "Invalid Lloyd_George_Record separator", + "StoredFileName": "test/9730787654/1of_Lloyd_George_Record_[Otis TYMAN]_[9730787654]_[28-01-1964].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-Before-9730787263].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-Before-9730787263].json new file mode 100644 index 0000000000..072fc42060 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-Before-9730787263].json @@ -0,0 +1,6 @@ +{ + "_description": "PP-3-Invalid Lloyd_George_Record separator-Before", + "bulk_upload_report": null, + "metadata": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-Invalid Lloyd_George_Record-9730787751].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-Invalid Lloyd_George_Record-9730787751].json new file mode 100644 index 0000000000..232de2009c --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-Invalid Lloyd_George_Record-9730787751].json @@ -0,0 +1,14 @@ +{ + "_description": "PP-4-Invalid Lloyd_George_Record", + "bulk_upload_report": { + "FilePath": "test/9730787751/1of1_Floyd_George_Record_[Rachel STILL]_[9730787751]_[01-01-2002].pdf", + "NhsNumber": "9730787751", + "PdsOdsCode": "", + "Reason": "Invalid Lloyd_George_Record separator", + "StoredFileName": "test/9730787751/1of1_Floyd_George_Record_[Rachel STILL]_[9730787751]_[01-01-2002].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-9730786968].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-9730786968].json new file mode 100644 index 0000000000..6492024b75 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-9730786968].json @@ -0,0 +1,14 @@ +{ + "_description": "PP-6", + "bulk_upload_report": { + "FilePath": "test/9730786968/1of1_Lloyd_George_Record_[Anita EUSTON]_[119730786968]_[12-01-2003].pdf", + "NhsNumber": "9730786968", + "PdsOdsCode": "", + "Reason": "Incorrect NHS number or date format", + "StoredFileName": "test/9730786968/1of1_Lloyd_George_Record_[Anita EUSTON]_[119730786968]_[12-01-2003].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-9730786976].json new file mode 100644 index 0000000000..84684378a1 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-9730786976].json @@ -0,0 +1,14 @@ +{ + "_description": "PP-7", + "bulk_upload_report": { + "FilePath": "test/9730786976/1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[19730786976]_[24-07-192].pdf", + "NhsNumber": "9730786976", + "PdsOdsCode": "", + "Reason": "Invalid NHS number", + "StoredFileName": "test/9730786976/1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[19730786976]_[24-07-192].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-9-9730787581].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-9-9730787581].json new file mode 100644 index 0000000000..1d6b6abe9b --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-9-9730787581].json @@ -0,0 +1,6 @@ +{ + "_description": "PP-9", + "bulk_upload_report": null, + "metadata": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename-9000000005].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename-9000000005].json index f1c07fc1b8..7857aa6e0d 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename-9000000005].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename-9000000005].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-Could not find a valid date in the filename?", - "bulk_upload_report": { - "FilePath": "9730153819 07-Aug-2020/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000005.pdf", - "NhsNumber": "9000000005", - "PdsOdsCode": "", - "Reason": "Could not find a valid date in the filename", - "StoredFileName": "9730153819 07-Aug-2020/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000005.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000045].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000045].json index acf9d8c7fd..e0a2232a09 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000045].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000045].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-Could not find a valid date in the filename.", - "bulk_upload_report": { - "FilePath": "1232323232 12-Aug-1999 Catherine Higgins/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000045.pdf", - "NhsNumber": "9000000045", - "PdsOdsCode": "", - "Reason": "Could not find a valid date in the filename", - "StoredFileName": "1232323232 12-Aug-1999 Catherine Higgins/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000045.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000055].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000055].json index 810a01e05a..e0a2232a09 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000055].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000055].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-Could not find a valid date in the filename.", - "bulk_upload_report": { - "FilePath": "1253617284 Adam Thomas 07-Nov-99/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000055.pdf", - "NhsNumber": "9000000055", - "PdsOdsCode": "", - "Reason": "Could not find a valid date in the filename", - "StoredFileName": "1253617284 Adam Thomas 07-Nov-99/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000055.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000099].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000099].json index 22a1aa9e50..e0a2232a09 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000099].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000099].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-Could not find a valid date in the filename.", - "bulk_upload_report": { - "FilePath": "2516273843 Fiona Smith/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000099.pdf", - "NhsNumber": "9000000099", - "PdsOdsCode": "", - "Reason": "Could not find a valid date in the filename", - "StoredFileName": "2516273843 Fiona Smith/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000099.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-File extension .tiff is not supported-9000000001].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-File extension .tiff is not supported-9000000001].json index 488cb3ce98..385f962812 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-File extension .tiff is not supported-9000000001].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-File extension .tiff is not supported-9000000001].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-File extension .tiff is not supported", - "bulk_upload_report": { - "FilePath": "9730153752 Dawn FLING 19-Sep-2011/fgdgdf2f4e4dtd_B_1_Lloyd_George_tiff_NOS_9730153752.tiff", - "NhsNumber": "9000000001", - "PdsOdsCode": "", - "Reason": "File extension .tiff is not supported", - "StoredFileName": "9730153752 Dawn FLING 19-Sep-2011/fgdgdf2f4e4dtd_B_1_Lloyd_George_tiff_NOS_9730153752.tiff", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid NHS number-9000000088].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid NHS number-9000000088].json index 054cfca319..7609ff497f 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid NHS number-9000000088].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid NHS number-9000000088].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-Invalid NHS number", - "bulk_upload_report": { - "FilePath": "Stewart Smith 07-Sep-1998/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000088.pdf", - "NhsNumber": "9000000088", - "PdsOdsCode": "", - "Reason": "Invalid NHS number", - "StoredFileName": "Stewart Smith 07-Sep-1998/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000088.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid date format-9000000044].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid date format-9000000044].json index b222e2e9b7..d775eb5f67 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid date format-9000000044].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid date format-9000000044].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-Invalid date format", - "bulk_upload_report": { - "FilePath": "1234567895 Lillian Percy 07-24-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000044.pdf", - "NhsNumber": "9000000044", - "PdsOdsCode": "", - "Reason": "Invalid date format", - "StoredFileName": "1234567895 Lillian Percy 07-24-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000044.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000008].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000008].json index 92c42a7ad4..f20e67b44c 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000008].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000008].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-Invalid patient name", - "bulk_upload_report": { - "FilePath": "9730153 Louisa Gables 07-Nov-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000008.pdf", - "NhsNumber": "9000000008", - "PdsOdsCode": "", - "Reason": "Invalid NHS number", - "StoredFileName": "9730153 Louisa Gables 07-Nov-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000008.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000067].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000067].json index db4a5090cc..f20e67b44c 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000067].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000067].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-Invalid patient name", - "bulk_upload_report": { - "FilePath": "12-Aug-1944 Catherine Higgins 1992323232/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000067.pdf", - "NhsNumber": "9000000067", - "PdsOdsCode": "", - "Reason": "Invalid patient name", - "StoredFileName": "12-Aug-1944 Catherine Higgins 1992323232/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000067.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Multi-part documents are not supported-9000000003].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Multi-part documents are not supported-9000000003].json index 1144e566c8..2584dffbdd 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Multi-part documents are not supported-9000000003].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Multi-part documents are not supported-9000000003].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-Multi-part documents are not supported", - "bulk_upload_report": { - "FilePath": "9730153973 Sue Lara TEMPLE 25-Jul-2010/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of7_9730153973.pdf", - "NhsNumber": "9000000003", - "PdsOdsCode": "", - "Reason": "Multi-part documents are not supported", - "StoredFileName": "9730153973 Sue Lara TEMPLE 25-Jul-2010/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of7_9730153973.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-no space between name and dob-9000000066].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-no space between name and dob-9000000066].json index 712e30071a..b1a43ab7ed 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-no space between name and dob-9000000066].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-no space between name and dob-9000000066].json @@ -1,14 +1,6 @@ { "_description": "USB-Rejected-no space between name and dob", - "bulk_upload_report": { - "FilePath": "9725362748 Geraldine Ellis07-Sep-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000066.pdf", - "NhsNumber": "9000000066", - "PdsOdsCode": "", - "Reason": "Could not find a valid date in the filename", - "StoredFileName": "9725362748 Geraldine Ellis07-Sep-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000066.pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Accept-9730787158].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Accept-9730787158].json index 91964f69f4..c6b9dc1118 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Accept-9730787158].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Accept-9730787158].json @@ -1,27 +1,6 @@ { "_description": "SCOD-Accept", - "bulk_upload_report": { - "FilePath": "expedite/1of1_Lloyd_George_Record_[Felix Alfred VOS]_[9730787158]_[03-01-2016].pdf", - "NhsNumber": "9730787158", - "PdsOdsCode": "M85143", - "StoredFileName": "expedite/1of1_Lloyd_George_Record_[Felix Alfred VOS]_[9730787158]_[03-01-2016].pdf", - "UploadStatus": "complete", - "UploaderOdsCode": "expedite" - }, - "metadata": { - "Author": "expedite", - "ContentType": "application/pdf", - "CurrentGpOds": "M85143", - "Custodian": "M85143", - "DocStatus": "final", - "DocumentSnomedCodeType": "16521000000101", - "FileName": "1of1_Lloyd_George_Record_[Felix Alfred VOS]_[9730787158]_[03-01-2016].pdf", - "FileSize": "Decimal('173760')", - "NhsNumber": "9730787158", - "Status": "current", - "Uploaded": true, - "Version": "1", - "VirusScannerResult": "Clean" - }, + "bulk_upload_report": null, + "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Reject-9730787159].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Reject-9730787159].json index c41adf1eaf..43e4322b50 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Reject-9730787159].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Reject-9730787159].json @@ -1,14 +1,6 @@ { "_description": "SCOD-Reject", - "bulk_upload_report": { - "FilePath": "expedite/1of1_Lloyd_George_Record_[Felix Alfred VOS]_[9730787159]_[03-01-2016].pdf", - "NhsNumber": "9730787159", - "PdsOdsCode": "", - "Reason": "Invalid NHS number format", - "StoredFileName": "expedite/1of1_Lloyd_George_Record_[Felix Alfred VOS]_[9730787159]_[03-01-2016].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "expedite" - }, + "bulk_upload_report": null, "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/test_reject_bulk_upload.py b/lambdas/tests/e2e/bulk_upload/check/test_reject_bulk_upload.py index b22df54da6..af9ac32caf 100644 --- a/lambdas/tests/e2e/bulk_upload/check/test_reject_bulk_upload.py +++ b/lambdas/tests/e2e/bulk_upload/check/test_reject_bulk_upload.py @@ -32,6 +32,7 @@ def bulk_upload_table_records(): "lloyd_george_records": lloyd_george_data_helper.scan_lloyd_george_table(), "bulk_upload_report_records": lloyd_george_data_helper.scan_bulk_upload_report_table(), "unstitched_records": lloyd_george_data_helper.scan_unstitch_table(), + "review_records": lloyd_george_data_helper.scan_review_table() } diff --git a/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv b/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv index cb919029f6..48d8c3e6e2 100644 --- a/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv +++ b/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv @@ -1,11 +1,10 @@ Test-Description,FILEPATH,PAGE COUNT,GP-PRACTICE-CODE,NHS-NO,SECTION,SUB-SECTION,SCAN-DATE,SCAN-ID,USER-ID,UPLOAD -General-Rejected-invalid date format - Invalid Month,01 of 02_Lloyd_George_Record_Steph Stevens_9000000001_12.25.2010.pdf,1,H81109,9000000101,LG,,01/01/2023,NEC,NEC,23/11/2023 -General-Rejected-incorrect NHS number or date format - Invalid Format,01 of 02_Lloyd_George_Record_Andrew Stevens_9000000001_12.10.21.pdf,1,H81109,9000000201,LG,,01/01/2023,NEC,NEC,23/11/2023 -General-Rejected-Invalid date format,01 of 02_Lloyd_George_Record_Jaimie Stevens_9000000001_300.4.2010.pdf,1,H81109,9000000051,LG,,01/01/2023,NEC,NEC,23/11/2023 -General-Rejected-Invalid NHS number,01 of 02_Lloyd_George_Record_Jane Stevens_900_000_0001_11.10.2010.pdf,1,H81109,9000000061,LG,,01/01/2023,NEC,NEC,23/11/2023 -General-Rejected-incorrect NHS number or date format,01 of 02_Lloyd_George_Record_Patricia Stevens_9000000001_2_11.10.2010.pdf,1,H81109,9000000071,LG,,01/01/2023,NEC,NEC,23/11/2023 -General-Rejected-incorrect document path format,103/01 02_Lloyd_George_Record_Charles Stevens_9000000001_22.10.2010.pdf,1,H81109,9000000081,LG,,01/01/2023,NEC,NEC,23/11/2023 -General-Rejected-Missing 'lloyd george record',1093/01 of 02_Phineas Stevens_9000000001_22.10.2010.pdf,1,H81109,9500000001,LG,,01/01/2023,NEC,NEC,23/11/2023 -General-Rejected-Nhs Not in PDS,1of1_Lloyd_George_Record_[Josh Lucien PLATT]_[9596333437]_[23-10-1979].pdf,1,M85143,9596333437,LG,,01/01/2023,NEC,NEC,29/10/2025 -General-Rejected-Infected,1of1_Lloyd_George_Record_[Moses Ivan WELLS]_[9730788529]_[20-03-1994].pdf,1,M85143,9730788529,LG,,01/01/2023,NEC,NEC,29/10/2025 -General-Rejected-Corrupted,test/9730788022/1of1_Lloyd_George_Record_[Cath YOUDS]_[9730788022]_[05-05-1965].pdf,1,M85143,9730788022,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-2-Incorrect document path format,test/9730787573/1OF1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf,1,M85143,9730787573,LG,NULL,2023-01-01,NEC,NEC,NULL +PP-3-Invalid Lloyd_George_Record separator-Before,test/9730787263/of1_Lloyd_George_Record_[Joy DOOLEY]_[9730787263]_[07-07-2023].pdf,1,M85143,9730787263,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-4-Invalid Lloyd_George_Record,test/9730787751/1of1_Floyd_George_Record_[Rachel STILL]_[9730787751]_[01-01-2002].pdf,1,M85143,9730787751,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-6,test/9730786968/1of1_Lloyd_George_Record_[Anita EUSTON]_[119730786968]_[12-01-2003].pdf,1,M85143,9730786968,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-7,test/9730786976/1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[19730786976]_[24-07-192].pdf,1,M85143,9730786976,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-9,test/9730787581/1of1_Lloyd_George_Record_[Lucien Andrew PERRY]_[9730787581]_[30-02-1959].pdf,1,M85143,9730787581,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-10,test/9730787611/1of1_Lloyd_George_Record_[Gary Jack INSKIP]_[9730787611]_[04-09-1960],1,M85143,9730787611,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-11,test/9730787735/1of1_Lloyd_GEORGE_Record_[Gemma Jeanne HIRD]_[9730787735]_[02/08/1994].pdf,1,M85143,9730787735,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-11,test/9730787735/1_of_1_LLOYD_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf,1,M85143,9730787735,LG,,01/01/2023,NEC,NEC,21/11/2025 diff --git a/lambdas/tests/e2e/bulk_upload/upload/test_initiate_bulk_upload.py b/lambdas/tests/e2e/bulk_upload/upload/test_initiate_bulk_upload.py index f6983d7d5c..5463bc1885 100644 --- a/lambdas/tests/e2e/bulk_upload/upload/test_initiate_bulk_upload.py +++ b/lambdas/tests/e2e/bulk_upload/upload/test_initiate_bulk_upload.py @@ -75,8 +75,8 @@ def run_bulk_upload_with_remappings_and_fixes(metada_filename, remappings, fixed def test_run_bulk_upload_accepted(): rows = read_metadata_csv(datadir, "accept-metadata.csv") for row in rows: - pdf_filepath = datadir / "pdf" / "valid.pdf" - upload_record(row["FILEPATH"], pdf_filepath, "accept") + pdf_filepath = datadir / "pdf" / "valid.pdf" + upload_record(row["FILEPATH"], pdf_filepath, "accept") metadata_filepath = datadir / "accept-metadata.csv" s3_key = "accept/index.csv" diff --git a/lambdas/tests/e2e/helpers/data_helper.py b/lambdas/tests/e2e/helpers/data_helper.py index 7d57769c75..26ce42339b 100644 --- a/lambdas/tests/e2e/helpers/data_helper.py +++ b/lambdas/tests/e2e/helpers/data_helper.py @@ -203,6 +203,7 @@ def __init__(self): self.bulk_upload_table_name = "BulkUploadReport" self.metadata_processor_lambda_name = "BulkUploadMetadataProcessor" self.unstitched_table_name = "UnstitchedLloydGeorgeReferenceMetadata" + self.review_table_name = "DocumentReviewProcessor" self.staging_bucket = "staging-bulk-store" self.bulk_upload_table = None self.unstitched_table = None @@ -224,6 +225,7 @@ def build_env(self, table_name, bucket_name): self.metadata_processor_lambda = f"{self.workspace}_{self.metadata_processor_lambda_name}" self.unstitched_table = f"{self.workspace}_{self.unstitched_table_name}" self.staging_bucket = f"{self.workspace}-{self.staging_bucket}" + self.review_table = f"{self.workspace}_{self.review_table_name}" def scan_bulk_upload_report_table(self): return self.dynamo_service.scan_whole_table(self.bulk_upload_table or "") @@ -231,6 +233,9 @@ def scan_bulk_upload_report_table(self): def scan_unstitch_table(self): return self.dynamo_service.scan_whole_table(self.unstitched_table or "") + def scan_review_table(self): + return self.dynamo_service.scan_whole_table(self.review_table or "") + def run_bulk_upload(self, payload): payload = json.dumps(payload) response = self.lambda_client.invoke( diff --git a/lambdas/utils/filename_utils.py b/lambdas/utils/filename_utils.py index c4b90d6575..8fb1cc4654 100644 --- a/lambdas/utils/filename_utils.py +++ b/lambdas/utils/filename_utils.py @@ -153,9 +153,9 @@ def extract_patient_name_from_bulk_upload_file_name( Raises: InvalidFileNameException: If the patient name is invalid or not found. """ - document_number_expression = r".*?([\p{L}][^\d]*[\p{L}])(.*)" + patient_extraction_pattern = r".*?([\p{L}][^\d]*[\p{L}])(.*)" expression_result = regex.search( - rf"{document_number_expression}", file_path, regex.IGNORECASE + rf"{patient_extraction_pattern}", file_path, regex.IGNORECASE ) if expression_result is None: From d5d2b038f584600bbaeefb937dcc5852c805d3c9 Mon Sep 17 00:00:00 2001 From: robg-test <106234256+robg-test@users.noreply.github.com> Date: Tue, 3 Feb 2026 10:14:53 +0000 Subject: [PATCH 2/3] [PRMP-1345] WIP --- ...pt-Multi File Upload 1of3-9730786976].json | 70 +++++++++++++++++++ ...pt-Multi File Upload 2of3-9730786976].json | 70 +++++++++++++++++++ ...pt-Multi File Upload 3of3-9730786976].json | 70 +++++++++++++++++++ ...sed-Hyphenated Nhs Number-9730154406].json | 27 +++++++ ...sed-LloydGeorge Name Edit-9730786925].json | 27 +++++++ ...sed-Mixed Spacing in Page-9730154775].json | 27 +++++++ ...-Processed-Mixed brackets-9730154090].json | 27 +++++++ ...cessed-Spacing Nhs Number-9730154724].json | 27 +++++++ ...Accept-Single File Upload-9730787026].json | 27 +++++++ ...ed-Multi File Upload 1of3-9730786976].json | 12 ---- ...ed-Multi File Upload 2of3-9730786976].json | 12 ---- ...ed-Multi File Upload 3of3-9730786976].json | 12 ---- ...sor Hyphenated Nhs Number-9730154406].json | 6 -- ...sor LloydGeorge Name Edit-9730786925].json | 6 -- ...sor Mixed Spacing in Page-9730154775].json | 6 -- ...-processor Mixed brackets-9730154090].json | 6 -- ...cessor Spacing Nhs Number-9730154724].json | 6 -- ...cepted-Single File Upload-9730787026].json | 6 -- ...and_fixed[9730787492-Remap and Fixed].json | 27 ++++++- ...ions[USB-Accept-Processed-9730153817].json | 29 ++++++++ ...ns[USB-Accept-Unprocessed-9730153760].json | 29 ++++++++ ...Accepted-1of1 in filename-9730153817].json | 6 -- ...idation if already valid)-9730153760].json | 6 -- ...ect-Patient Name Mismatch-9730787417].json | 35 ++++++++++ ...-Missing or Infected File-9730787573].json | 28 ++++++++ ...ral-Reject-Corrupted File-9730787298].json | 15 ++++ ...eral-Reject-Missing Files-9730787328].json | 35 ++++++++++ ...ect-More Files than total-9730787735].json | 31 ++++++++ ...ct-More Files thant total-9730787735].json | 31 ++++++++ ... Number metadata mismatch-9730787352].json | 35 ++++++++++ ...ral-Reject-Missing Files-97307871820].json | 31 ++++++++ ...ral-Reject-Missing Files-97307871821].json | 31 ++++++++ ...d not find patient in PDS-9476281359].json | 15 ++++ ...l_reject_ingestions[PP-10-9730787611].json | 14 ---- ...ct-Invalid File Extension-9730787611].json | 28 ++++++++ ..._reject_ingestions[PP-11-97307877350].json | 14 ---- ..._reject_ingestions[PP-11-97307877351].json | 14 ---- ...ect-Incorrect Path Format-9730787573].json | 28 ++++++++ ...rect document path format-9730787573].json | 14 ---- ...ge_Record separator-After-9730787654].json | 14 ---- ...e_Record separator-Before-9730787263].json | 6 -- ...Not a Lloyd George Record-9730787751].json | 28 ++++++++ ...valid Lloyd_George_Record-9730787751].json | 14 ---- ...al_reject_ingestions[PP-6-9730786968].json | 14 ---- ...orrect NHS Number or Date-9730786968].json | 28 ++++++++ ...al_reject_ingestions[PP-7-9730786976].json | 14 ---- ...Reject-Invalid NHS Number-9730786976].json | 68 ++++++++++++++++++ ...al_reject_ingestions[PP-9-9730787581].json | 6 -- ...-Prevent Fixed on File and NhsNumber].json | 5 -- ...alid date in the filename-9000000005].json | 10 ++- ...lid date in the filename.-9000000045].json | 10 ++- ...lid date in the filename.-9000000055].json | 10 ++- ...lid date in the filename.-9000000099].json | 10 ++- ...on .tiff is not supported-9000000001].json | 10 ++- ...jected-Invalid NHS number-9000000088].json | 10 ++- ...ected-Invalid date format-9000000044].json | 10 ++- ...cted-Invalid patient name-9000000008].json | 10 ++- ...cted-Invalid patient name-9000000067].json | 10 ++- ...cuments are not supported-9000000003].json | 10 ++- ...pace between name and dob-9000000066].json | 10 ++- ...od_ingestions[SCOD-Accept-9730787158].json | 26 ++++++- ...od_ingestions[SCOD-Reject-9730787159].json | 10 ++- .../check/test_reject_bulk_upload.py | 13 +++- lambdas/tests/e2e/bulk_upload/conftest.py | 31 ++++---- .../bulk_upload/data/accept-metadata-usb.csv | 4 +- .../e2e/bulk_upload/data/accept-metadata.csv | 18 ++--- .../data/accept-remap-and-fixed.csv | 2 +- .../e2e/bulk_upload/data/reject-fixed.csv | 2 +- .../e2e/bulk_upload/data/reject-metadata.csv | 24 ++++--- .../upload/test_initiate_bulk_upload.py | 7 +- lambdas/tests/e2e/helpers/data_helper.py | 22 +++++- 71 files changed, 1134 insertions(+), 272 deletions(-) create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 1of3-9730786976].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 2of3-9730786976].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 3of3-9730786976].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Hyphenated Nhs Number-9730154406].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-LloydGeorge Name Edit-9730786925].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Mixed Spacing in Page-9730154775].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Mixed brackets-9730154090].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Spacing Nhs Number-9730154724].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Single File Upload-9730787026].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 1of3-9730786976].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 2of3-9730786976].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 3of3-9730786976].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Hyphenated Nhs Number-9730154406].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor LloydGeorge Name Edit-9730786925].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed Spacing in Page-9730154775].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed brackets-9730154090].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Spacing Nhs Number-9730154724].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Single File Upload-9730787026].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accept-Processed-9730153817].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accept-Unprocessed-9730153760].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-1of1 in filename-9730153817].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-sent straight to queue (skips validation if already valid)-9730153760].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-12-General-Reject-Patient Name Mismatch-9730787417].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-13-General-Reject-Missing or Infected File-9730787573].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-14-General-Reject-Corrupted File-9730787298].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-3-General-Reject-Missing Files-9730787328].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-4-General-Reject-More Files than total-9730787735].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-4-General-Reject-More Files thant total-9730787735].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-6-General-Reject-NHS Number metadata mismatch-9730787352].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-7-General-Reject-Missing Files-97307871820].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-7-General-Reject-Missing Files-97307871821].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-9-General-Reject-Could not find patient in PDS-9476281359].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-9730787611].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-General-Reject-Invalid File Extension-9730787611].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877350].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877351].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-General-Reject-Incorrect Path Format-9730787573].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-Incorrect document path format-9730787573].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-After-9730787654].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-Before-9730787263].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-General-Reject-Not a Lloyd George Record-9730787751].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-Invalid Lloyd_George_Record-9730787751].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-9730786968].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-General-Reject-Incorrect NHS Number or Date-9730786968].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-9730786976].json create mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-General-Reject-Invalid NHS Number-9730786976].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-9-9730787581].json delete mode 100644 lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_remap_and_fixed[123456789-Prevent Fixed on File and NhsNumber].json diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 1of3-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 1of3-9730786976].json new file mode 100644 index 0000000000..8ab7dc8c00 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 1of3-9730786976].json @@ -0,0 +1,70 @@ +{ + "_description": "General-Accept-Multi File Upload 1of3", + "bulk_upload_report": { + "NhsNumber": "9730786976", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf", + "FileSize": "Decimal('578652')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [ + { + "Author": "M85143", + "ContentType": "application/pdf", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + { + "Author": "M85143", + "ContentType": "application/pdf", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + { + "Author": "M85143", + "ContentType": "application/pdf", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + } + ] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 2of3-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 2of3-9730786976].json new file mode 100644 index 0000000000..60d0a05323 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 2of3-9730786976].json @@ -0,0 +1,70 @@ +{ + "_description": "General-Accept-Multi File Upload 2of3", + "bulk_upload_report": { + "NhsNumber": "9730786976", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf", + "FileSize": "Decimal('578652')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [ + { + "Author": "M85143", + "ContentType": "application/pdf", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + { + "Author": "M85143", + "ContentType": "application/pdf", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + { + "Author": "M85143", + "ContentType": "application/pdf", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + } + ] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 3of3-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 3of3-9730786976].json new file mode 100644 index 0000000000..be6f071eca --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Multi File Upload 3of3-9730786976].json @@ -0,0 +1,70 @@ +{ + "_description": "General-Accept-Multi File Upload 3of3", + "bulk_upload_report": { + "NhsNumber": "9730786976", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf", + "FileSize": "Decimal('578652')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [ + { + "Author": "M85143", + "ContentType": "application/pdf", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + { + "Author": "M85143", + "ContentType": "application/pdf", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + { + "Author": "M85143", + "ContentType": "application/pdf", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730786976", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + } + ] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Hyphenated Nhs Number-9730154406].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Hyphenated Nhs Number-9730154406].json new file mode 100644 index 0000000000..d5a6a6ccc7 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Hyphenated Nhs Number-9730154406].json @@ -0,0 +1,27 @@ +{ + "_description": "General-Accept-Processed-Hyphenated Nhs Number", + "bulk_upload_report": { + "NhsNumber": "9730154406", + "PdsOdsCode": "H81109", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "UploadStatus": "complete", + "UploaderOdsCode": "H81109" + }, + "metadata": { + "Author": "H81109", + "ContentType": "application/pdf", + "CurrentGpOds": "H81109", + "Custodian": "H81109", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[MEIXIANG XIAOLIAN FONG]_[9730154406]_[27-11-1944].pdf", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730154406", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-LloydGeorge Name Edit-9730786925].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-LloydGeorge Name Edit-9730786925].json new file mode 100644 index 0000000000..ca2613f091 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-LloydGeorge Name Edit-9730786925].json @@ -0,0 +1,27 @@ +{ + "_description": "General-Accept-Processed-LloydGeorge Name Edit", + "bulk_upload_report": { + "NhsNumber": "9730786925", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Harry Adam TWIST]_[9730786925]_[01-04-1925].pdf", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730786925", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Mixed Spacing in Page-9730154775].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Mixed Spacing in Page-9730154775].json new file mode 100644 index 0000000000..eb6f51d481 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Mixed Spacing in Page-9730154775].json @@ -0,0 +1,27 @@ +{ + "_description": "General-Accept-Processed-Mixed Spacing in Page", + "bulk_upload_report": { + "NhsNumber": "9730154775", + "PdsOdsCode": "H81109", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "UploadStatus": "complete", + "UploaderOdsCode": "H81109" + }, + "metadata": { + "Author": "H81109", + "ContentType": "application/pdf", + "CurrentGpOds": "H81109", + "Custodian": "H81109", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Andrea Gladys HOAKES]_[9730154775]_[09-01-2009].pdf", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730154775", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Mixed brackets-9730154090].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Mixed brackets-9730154090].json new file mode 100644 index 0000000000..3f2ed5c5f1 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Mixed brackets-9730154090].json @@ -0,0 +1,27 @@ +{ + "_description": "General-Accept-Processed-Mixed brackets", + "bulk_upload_report": { + "NhsNumber": "9730154090", + "PdsOdsCode": "H81109", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "UploadStatus": "complete", + "UploaderOdsCode": "H81109" + }, + "metadata": { + "Author": "H81109", + "ContentType": "application/pdf", + "CurrentGpOds": "H81109", + "Custodian": "H81109", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Tarina Sybill LEVY]_[9730154090]_[14-09-1961].pdf", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730154090", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Spacing Nhs Number-9730154724].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Spacing Nhs Number-9730154724].json new file mode 100644 index 0000000000..9a7706c5e0 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Processed-Spacing Nhs Number-9730154724].json @@ -0,0 +1,27 @@ +{ + "_description": "General-Accept-Processed-Spacing Nhs Number", + "bulk_upload_report": { + "NhsNumber": "9730154724", + "PdsOdsCode": "H81109", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "UploadStatus": "complete", + "UploaderOdsCode": "H81109" + }, + "metadata": { + "Author": "H81109", + "ContentType": "application/pdf", + "CurrentGpOds": "H81109", + "Custodian": "H81109", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[GILALA NYSSA RUBENSTEIN]_[9730154724]_[18-07-2020].pdf", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730154724", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Single File Upload-9730787026].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Single File Upload-9730787026].json new file mode 100644 index 0000000000..e8d3bfef17 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accept-Single File Upload-9730787026].json @@ -0,0 +1,27 @@ +{ + "_description": "General-Accept-Single File Upload", + "bulk_upload_report": { + "NhsNumber": "9730787026", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Dora Celia HAMNET]_[9730787026]_[07-07-1926].pdf", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730787026", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 1of3-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 1of3-9730786976].json deleted file mode 100644 index 1aed4168cf..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 1of3-9730786976].json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "_description": "General-Accepted-Multi File Upload 1of3", - "bulk_upload_report": { - "NhsNumber": "9730786976", - "PdsOdsCode": "", - "Reason": "Invalid NHS number", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 2of3-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 2of3-9730786976].json deleted file mode 100644 index adb277a85a..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 2of3-9730786976].json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "_description": "General-Accepted-Multi File Upload 2of3", - "bulk_upload_report": { - "NhsNumber": "9730786976", - "PdsOdsCode": "", - "Reason": "Invalid NHS number", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 3of3-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 3of3-9730786976].json deleted file mode 100644 index 2830173805..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Multi File Upload 3of3-9730786976].json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "_description": "General-Accepted-Multi File Upload 3of3", - "bulk_upload_report": { - "NhsNumber": "9730786976", - "PdsOdsCode": "", - "Reason": "Invalid NHS number", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Hyphenated Nhs Number-9730154406].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Hyphenated Nhs Number-9730154406].json deleted file mode 100644 index f38665d273..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Hyphenated Nhs Number-9730154406].json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "_description": "General-Accepted-Pre-processor Hyphenated Nhs Number", - "bulk_upload_report": null, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor LloydGeorge Name Edit-9730786925].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor LloydGeorge Name Edit-9730786925].json deleted file mode 100644 index 2c25e752d5..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor LloydGeorge Name Edit-9730786925].json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "_description": "General-Accepted-Pre-processor LloydGeorge Name Edit", - "bulk_upload_report": null, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed Spacing in Page-9730154775].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed Spacing in Page-9730154775].json deleted file mode 100644 index fe5d7540b4..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed Spacing in Page-9730154775].json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "_description": "General-Accepted-Pre-processor Mixed Spacing in Page", - "bulk_upload_report": null, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed brackets-9730154090].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed brackets-9730154090].json deleted file mode 100644 index 491fa6c3a5..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Mixed brackets-9730154090].json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "_description": "General-Accepted-Pre-processor Mixed brackets", - "bulk_upload_report": null, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Spacing Nhs Number-9730154724].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Spacing Nhs Number-9730154724].json deleted file mode 100644 index e262874425..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Pre-processor Spacing Nhs Number-9730154724].json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "_description": "General-Accepted-Pre-processor Spacing Nhs Number", - "bulk_upload_report": null, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Single File Upload-9730787026].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Single File Upload-9730787026].json deleted file mode 100644 index 17e27a61a8..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_general_accepted_ingestions[General-Accepted-Single File Upload-9730787026].json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "_description": "General-Accepted-Single File Upload", - "bulk_upload_report": null, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_remap_and_fixed[9730787492-Remap and Fixed].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_remap_and_fixed[9730787492-Remap and Fixed].json index 7e26a6475c..a7e2b5836c 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_remap_and_fixed[9730787492-Remap and Fixed].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_remap_and_fixed[9730787492-Remap and Fixed].json @@ -1,6 +1,29 @@ { "_description": "Remap and Fixed", - "bulk_upload_report": null, - "metadata": null, + "bulk_upload_report": { + "FilePath": "accept-remap-and-fixed/test/9730787492/1of1_Lloyd_George_Record_[Bob SPEAR]_[9730787492]_[05-08-1968].pdf", + "NhsNumber": "9730787492", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 1 given name", + "StoredFileName": "test/9730787492/1of1_Lloyd_George_Record_[Bob SPEAR]_[9730787492]_[05-08-1968].pdf", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2022-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Bob SPEAR]_[9730787492]_[05-08-1968].pdf", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730787492", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accept-Processed-9730153817].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accept-Processed-9730153817].json new file mode 100644 index 0000000000..0e5b0dd731 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accept-Processed-9730153817].json @@ -0,0 +1,29 @@ +{ + "_description": "USB-Accept-Processed", + "bulk_upload_report": { + "FilePath": "accept-usb/9730153817 Haley Glenda RUDKIN 07-Aug-2023/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9730153817.pdf", + "NhsNumber": "9730153817", + "PdsOdsCode": "H81109", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "StoredFileName": "9730153817 Haley Glenda RUDKIN 07-Aug-2023/1of1_Lloyd_George_Record_[Haley Glenda RUDKIN]_[9730153817]_[07-08-2023].pdf", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "CurrentGpOds": "H81109", + "Custodian": "H81109", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Haley Glenda RUDKIN]_[9730153817]_[07-08-2023].pdf", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730153817", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accept-Unprocessed-9730153760].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accept-Unprocessed-9730153760].json new file mode 100644 index 0000000000..a96cd36367 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accept-Unprocessed-9730153760].json @@ -0,0 +1,29 @@ +{ + "_description": "USB-Accept-Unprocessed", + "bulk_upload_report": { + "FilePath": "accept-usb/9730153760/1of1_Lloyd_George_Record_[Ruby Sandra MANTON]_[9730153760]_[08-01-2003].pdf", + "NhsNumber": "9730153760", + "PdsOdsCode": "H81109", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "StoredFileName": "9730153760/1of1_Lloyd_George_Record_[Ruby Sandra MANTON]_[9730153760]_[08-01-2003].pdf", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "CurrentGpOds": "H81109", + "Custodian": "H81109", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Ruby Sandra MANTON]_[9730153760]_[08-01-2003].pdf", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730153760", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "unstitched": [] +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-1of1 in filename-9730153817].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-1of1 in filename-9730153817].json deleted file mode 100644 index 4cf7030f12..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-1of1 in filename-9730153817].json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "_description": "USB-Accepted-1of1 in filename", - "bulk_upload_report": null, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-sent straight to queue (skips validation if already valid)-9730153760].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-sent straight to queue (skips validation if already valid)-9730153760].json deleted file mode 100644 index aeed0eeeff..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_accept_bulk_upload/test_usb_accepted_ingestions[USB-Accepted-sent straight to queue (skips validation if already valid)-9730153760].json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "_description": "USB-Accepted-sent straight to queue (skips validation if already valid)", - "bulk_upload_report": null, - "metadata": null, - "unstitched": [] -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-12-General-Reject-Patient Name Mismatch-9730787417].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-12-General-Reject-Patient Name Mismatch-9730787417].json new file mode 100644 index 0000000000..ef62a6a97c --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-12-General-Reject-Patient Name Mismatch-9730787417].json @@ -0,0 +1,35 @@ +{ + "_description": "BULK-12-General-Reject-Patient Name Mismatch", + "bulk_upload_report": { + "FilePath": "reject/test/9730787417/1of1_Lloyd_George_Record_[Notmename Andrew KINNOY]_[9730787417]_[25-12-1999].pdf", + "NhsNumber": "9730787417", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 2/3, matched on 1 family_name and 1 given name", + "StoredFileName": "test/9730787417/1of1_Lloyd_George_Record_[Notmename Andrew KINNOY]_[9730787417]_[25-12-1999].pdf", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "Created": "2026-01-29T10:48:27.285035Z", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileLocation": "s3://roga7-lloyd-george-store/9730787417/af702692-a9a0-4d66-8c8c-d02e07bdddd8", + "FileName": "1of1_Lloyd_George_Record_[Notmename Andrew KINNOY]_[9730787417]_[25-12-1999].pdf", + "FileSize": "Decimal('173760')", + "ID": "af702692-a9a0-4d66-8c8c-d02e07bdddd8", + "NhsNumber": "9730787417", + "S3FileKey": "9730787417/af702692-a9a0-4d66-8c8c-d02e07bdddd8", + "S3VersionID": "Xq_UY5JKvtXWEe57ozsEHjXReUzT8.6E", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "review": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-13-General-Reject-Missing or Infected File-9730787573].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-13-General-Reject-Missing or Infected File-9730787573].json new file mode 100644 index 0000000000..55bdb7431f --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-13-General-Reject-Missing or Infected File-9730787573].json @@ -0,0 +1,28 @@ +{ + "_description": "BULK-13-General-Reject-Missing or Infected File", + "bulk_upload_report": { + "FilePath": "reject/test/9730787573/1of1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf", + "NhsNumber": "9730787573", + "PdsOdsCode": "M85143", + "Reason": "One or more of the files is not accessible from staging bucket", + "StoredFileName": "test/9730787573/1of1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": { + "Author": "M85143", + "Custodian": "M85143", + "DocumentSnomedCodeType": "16521000000101", + "Files": [ + { + "FileName": "1OF1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf" + } + ], + "NhsNumber": "9730787573", + "ReviewReason": "Unsuccessful upload", + "ReviewStatus": "PENDING_REVIEW", + "Version": "Decimal('1')" + }, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-14-General-Reject-Corrupted File-9730787298].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-14-General-Reject-Corrupted File-9730787298].json new file mode 100644 index 0000000000..11e6071dcc --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-14-General-Reject-Corrupted File-9730787298].json @@ -0,0 +1,15 @@ +{ + "_description": "BULK-14-General-Reject-Corrupted File", + "bulk_upload_report": { + "FilePath": "reject/test/9730787298/1of1_Lloyd_George_Record_[Hazel DOYLE]_[9730787298]_[08-02-2020].pdf", + "NhsNumber": "9730787298", + "PdsOdsCode": "M85143", + "Reason": "One or more of the files were corrupt", + "StoredFileName": "test/9730787298/1of1_Lloyd_George_Record_[Hazel DOYLE]_[9730787298]_[08-02-2020].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-3-General-Reject-Missing Files-9730787328].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-3-General-Reject-Missing Files-9730787328].json new file mode 100644 index 0000000000..934d418811 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-3-General-Reject-Missing Files-9730787328].json @@ -0,0 +1,35 @@ +{ + "_description": "BULK-3-General-Reject-Missing Files", + "bulk_upload_report": { + "FilePath": "reject/test/9730787328/1of1_Lloyd_George_Record_[Agnes Gaynor MULLEN]_[9730787328]_[30-03-2017].pdf", + "NhsNumber": "9730787328", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "StoredFileName": "test/9730787328/1of1_Lloyd_George_Record_[Agnes Gaynor MULLEN]_[9730787328]_[30-03-2017].pdf", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "Created": "2026-01-29T10:48:25.403008Z", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileLocation": "s3://roga7-lloyd-george-store/9730787328/cf1c6bdb-badc-4031-9d9e-b09cda66b957", + "FileName": "1of1_Lloyd_George_Record_[Agnes Gaynor MULLEN]_[9730787328]_[30-03-2017].pdf", + "FileSize": "Decimal('173760')", + "ID": "cf1c6bdb-badc-4031-9d9e-b09cda66b957", + "NhsNumber": "9730787328", + "S3FileKey": "9730787328/cf1c6bdb-badc-4031-9d9e-b09cda66b957", + "S3VersionID": "4vUekEq_fsJm_YXBLv.bqLcfjiB.mKqm", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "review": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-4-General-Reject-More Files than total-9730787735].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-4-General-Reject-More Files than total-9730787735].json new file mode 100644 index 0000000000..59b4052e31 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-4-General-Reject-More Files than total-9730787735].json @@ -0,0 +1,31 @@ +{ + "_description": "BULK-4-General-Reject-More Files than total", + "bulk_upload_report": { + "FilePath": "reject/test/9730787735/1_of1_LLOYD_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf", + "NhsNumber": "9730787735", + "PdsOdsCode": "M85143", + "Reason": "There are more files than the total number in file name", + "StoredFileName": "test/9730787735/1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": { + "Author": "M85143", + "Custodian": "M85143", + "DocumentSnomedCodeType": "16521000000101", + "Files": [ + { + "FileName": "1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf" + }, + { + "FileName": "1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf" + } + ], + "NhsNumber": "9730787735", + "ReviewReason": "Unsuccessful upload", + "ReviewStatus": "PENDING_REVIEW", + "Version": "Decimal('1')" + }, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-4-General-Reject-More Files thant total-9730787735].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-4-General-Reject-More Files thant total-9730787735].json new file mode 100644 index 0000000000..05091da1a3 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-4-General-Reject-More Files thant total-9730787735].json @@ -0,0 +1,31 @@ +{ + "_description": "BULK-4-General-Reject-More Files thant total", + "bulk_upload_report": { + "FilePath": "reject/test/9730787735/1_of1_LLOYD_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf", + "NhsNumber": "9730787735", + "PdsOdsCode": "M85143", + "Reason": "There are more files than the total number in file name", + "StoredFileName": "test/9730787735/1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": { + "Author": "M85143", + "Custodian": "M85143", + "DocumentSnomedCodeType": "16521000000101", + "Files": [ + { + "FileName": "1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf" + }, + { + "FileName": "1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf" + } + ], + "NhsNumber": "9730787735", + "ReviewReason": "Unsuccessful upload", + "ReviewStatus": "PENDING_REVIEW", + "Version": "Decimal('1')" + }, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-6-General-Reject-NHS Number metadata mismatch-9730787352].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-6-General-Reject-NHS Number metadata mismatch-9730787352].json new file mode 100644 index 0000000000..e0160fceab --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-6-General-Reject-NHS Number metadata mismatch-9730787352].json @@ -0,0 +1,35 @@ +{ + "_description": "BULK-6-General-Reject-NHS Number metadata mismatch", + "bulk_upload_report": { + "FilePath": "reject/test/9730787352/1of1_Lloyd_George_Record_[Clara Kylie HOOD]_[9730787352]_[02-12-2010].pdf", + "NhsNumber": "9730787352", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "StoredFileName": "test/9730787352/1of1_Lloyd_George_Record_[Clara Kylie HOOD]_[9730787352]_[02-12-2010].pdf", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "Created": "2026-01-29T10:48:26.220099Z", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileLocation": "s3://roga7-lloyd-george-store/9730787352/fe422204-018c-4ced-ae01-a0c96db8b8dc", + "FileName": "1of1_Lloyd_George_Record_[Clara Kylie HOOD]_[9730787352]_[02-12-2010].pdf", + "FileSize": "Decimal('173760')", + "ID": "fe422204-018c-4ced-ae01-a0c96db8b8dc", + "NhsNumber": "9730787352", + "S3FileKey": "9730787352/fe422204-018c-4ced-ae01-a0c96db8b8dc", + "S3VersionID": "_X6pR9iM6NjB3dVTb.La6LX2VBA_JVsK", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "review": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-7-General-Reject-Missing Files-97307871820].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-7-General-Reject-Missing Files-97307871820].json new file mode 100644 index 0000000000..e20d17c0ac --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-7-General-Reject-Missing Files-97307871820].json @@ -0,0 +1,31 @@ +{ + "_description": "BULK-7-General-Reject-Missing Files", + "bulk_upload_report": { + "FilePath": "reject/test/9730787182/2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf", + "NhsNumber": "9730787182", + "PdsOdsCode": "M85143", + "Reason": "One or more of the files has the same filename", + "StoredFileName": "test/9730787182/2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": { + "Author": "M85143", + "Custodian": "M85143", + "DocumentSnomedCodeType": "16521000000101", + "Files": [ + { + "FileName": "2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf" + }, + { + "FileName": "2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf" + } + ], + "NhsNumber": "9730787182", + "ReviewReason": "Unsuccessful upload", + "ReviewStatus": "PENDING_REVIEW", + "Version": "Decimal('1')" + }, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-7-General-Reject-Missing Files-97307871821].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-7-General-Reject-Missing Files-97307871821].json new file mode 100644 index 0000000000..e20d17c0ac --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-7-General-Reject-Missing Files-97307871821].json @@ -0,0 +1,31 @@ +{ + "_description": "BULK-7-General-Reject-Missing Files", + "bulk_upload_report": { + "FilePath": "reject/test/9730787182/2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf", + "NhsNumber": "9730787182", + "PdsOdsCode": "M85143", + "Reason": "One or more of the files has the same filename", + "StoredFileName": "test/9730787182/2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": { + "Author": "M85143", + "Custodian": "M85143", + "DocumentSnomedCodeType": "16521000000101", + "Files": [ + { + "FileName": "2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf" + }, + { + "FileName": "2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf" + } + ], + "NhsNumber": "9730787182", + "ReviewReason": "Unsuccessful upload", + "ReviewStatus": "PENDING_REVIEW", + "Version": "Decimal('1')" + }, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-9-General-Reject-Could not find patient in PDS-9476281359].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-9-General-Reject-Could not find patient in PDS-9476281359].json new file mode 100644 index 0000000000..fe1a03b140 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[BULK-9-General-Reject-Could not find patient in PDS-9476281359].json @@ -0,0 +1,15 @@ +{ + "_description": "BULK-9-General-Reject-Could not find patient in PDS", + "bulk_upload_report": { + "FilePath": "reject/test/9730787271/1of1_Lloyd_George_Record_[Kate SUMMER]_[9476281359]_[27-08-2019].pdf", + "NhsNumber": "9476281359", + "PdsOdsCode": "", + "Reason": "Could not find the given patient on PDS", + "StoredFileName": "test/9730787271/1of1_Lloyd_George_Record_[Kate SUMMER]_[9476281359]_[27-08-2019].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": null, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-9730787611].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-9730787611].json deleted file mode 100644 index 0be6684ff2..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-9730787611].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "PP-10", - "bulk_upload_report": { - "FilePath": "test/9730787611/1of1_Lloyd_George_Record_[Gary Jack INSKIP]_[9730787611]_[04-09-1960]", - "NhsNumber": "9730787611", - "PdsOdsCode": "", - "Reason": "Invalid file extension", - "StoredFileName": "test/9730787611/1of1_Lloyd_George_Record_[Gary Jack INSKIP]_[9730787611]_[04-09-1960]", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-General-Reject-Invalid File Extension-9730787611].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-General-Reject-Invalid File Extension-9730787611].json new file mode 100644 index 0000000000..1c79e76ed1 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-10-General-Reject-Invalid File Extension-9730787611].json @@ -0,0 +1,28 @@ +{ + "_description": "PP-10-General-Reject-Invalid File Extension", + "bulk_upload_report": { + "FilePath": "reject/test/9730787611/1of1_Lloyd_George_Record_[Gary Jack INSKIP]_[9730787611]_[04-09-1960]", + "NhsNumber": "9730787611", + "PdsOdsCode": "", + "Reason": "Invalid file extension", + "StoredFileName": "test/9730787611/1of1_Lloyd_George_Record_[Gary Jack INSKIP]_[9730787611]_[04-09-1960]", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": { + "Author": "M85143", + "Custodian": "M85143", + "DocumentSnomedCodeType": "16521000000101", + "Files": [ + { + "FileName": "1of1_Lloyd_George_Record_[Gary Jack INSKIP]_[9730787611]_[04-09-1960]" + } + ], + "NhsNumber": "9730787611", + "ReviewReason": "Unsuccessful upload", + "ReviewStatus": "PENDING_REVIEW", + "Version": "Decimal('1')" + }, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877350].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877350].json deleted file mode 100644 index e22b858f55..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877350].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "PP-11", - "bulk_upload_report": { - "FilePath": "reject/test/9730787735/1of1_Lloyd_GEORGE_Record_[Gemma Jeanne HIRD]_[9730787735]_[02/08/1994].pdf", - "NhsNumber": "9730787735", - "PdsOdsCode": "M85143", - "Reason": "There are more files than the total number in file name", - "StoredFileName": "test/9730787735/1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877351].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877351].json deleted file mode 100644 index e22b858f55..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-11-97307877351].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "PP-11", - "bulk_upload_report": { - "FilePath": "reject/test/9730787735/1of1_Lloyd_GEORGE_Record_[Gemma Jeanne HIRD]_[9730787735]_[02/08/1994].pdf", - "NhsNumber": "9730787735", - "PdsOdsCode": "M85143", - "Reason": "There are more files than the total number in file name", - "StoredFileName": "test/9730787735/1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-General-Reject-Incorrect Path Format-9730787573].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-General-Reject-Incorrect Path Format-9730787573].json new file mode 100644 index 0000000000..a7371813ac --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-General-Reject-Incorrect Path Format-9730787573].json @@ -0,0 +1,28 @@ +{ + "_description": "PP-2-General-Reject-Incorrect Path Format", + "bulk_upload_report": { + "FilePath": "reject/test/9730787573/1of1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf", + "NhsNumber": "9730787573", + "PdsOdsCode": "M85143", + "Reason": "One or more of the files is not accessible from staging bucket", + "StoredFileName": "test/9730787573/1of1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": { + "Author": "M85143", + "Custodian": "M85143", + "DocumentSnomedCodeType": "16521000000101", + "Files": [ + { + "FileName": "1OF1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf" + } + ], + "NhsNumber": "9730787573", + "ReviewReason": "Unsuccessful upload", + "ReviewStatus": "PENDING_REVIEW", + "Version": "Decimal('1')" + }, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-Incorrect document path format-9730787573].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-Incorrect document path format-9730787573].json deleted file mode 100644 index 6eebb2e3fd..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-2-Incorrect document path format-9730787573].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "PP-2-Incorrect document path format", - "bulk_upload_report": { - "FilePath": "test/9730787573/1OF1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf", - "NhsNumber": "9730787573", - "PdsOdsCode": "", - "Reason": "Incorrect document path format", - "StoredFileName": "test/9730787573/1OF1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-After-9730787654].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-After-9730787654].json deleted file mode 100644 index 85444e3308..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-After-9730787654].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "PP-3-Invalid Lloyd_George_Record separator-After", - "bulk_upload_report": { - "FilePath": "test/9730787654/1of_Lloyd_George_Record_[Otis TYMAN]_[9730787654]_[28-01-1964].pdf", - "NhsNumber": "9730787654", - "PdsOdsCode": "", - "Reason": "Invalid Lloyd_George_Record separator", - "StoredFileName": "test/9730787654/1of_Lloyd_George_Record_[Otis TYMAN]_[9730787654]_[28-01-1964].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-Before-9730787263].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-Before-9730787263].json deleted file mode 100644 index 072fc42060..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-3-Invalid Lloyd_George_Record separator-Before-9730787263].json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "_description": "PP-3-Invalid Lloyd_George_Record separator-Before", - "bulk_upload_report": null, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-General-Reject-Not a Lloyd George Record-9730787751].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-General-Reject-Not a Lloyd George Record-9730787751].json new file mode 100644 index 0000000000..5aa3cff43e --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-General-Reject-Not a Lloyd George Record-9730787751].json @@ -0,0 +1,28 @@ +{ + "_description": "PP-4-General-Reject-Not a Lloyd George Record", + "bulk_upload_report": { + "FilePath": "reject/test/9730787751/1of1_Floyd_George_Record_[Rachel STILL]_[9730787751]_[01-01-2002].pdf", + "NhsNumber": "9730787751", + "PdsOdsCode": "", + "Reason": "Invalid Lloyd_George_Record separator", + "StoredFileName": "test/9730787751/1of1_Floyd_George_Record_[Rachel STILL]_[9730787751]_[01-01-2002].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": { + "Author": "M85143", + "Custodian": "M85143", + "DocumentSnomedCodeType": "16521000000101", + "Files": [ + { + "FileName": "1of1_Floyd_George_Record_[Rachel STILL]_[9730787751]_[01-01-2002].pdf" + } + ], + "NhsNumber": "9730787751", + "ReviewReason": "Unsuccessful upload", + "ReviewStatus": "PENDING_REVIEW", + "Version": "Decimal('1')" + }, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-Invalid Lloyd_George_Record-9730787751].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-Invalid Lloyd_George_Record-9730787751].json deleted file mode 100644 index 232de2009c..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-4-Invalid Lloyd_George_Record-9730787751].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "PP-4-Invalid Lloyd_George_Record", - "bulk_upload_report": { - "FilePath": "test/9730787751/1of1_Floyd_George_Record_[Rachel STILL]_[9730787751]_[01-01-2002].pdf", - "NhsNumber": "9730787751", - "PdsOdsCode": "", - "Reason": "Invalid Lloyd_George_Record separator", - "StoredFileName": "test/9730787751/1of1_Floyd_George_Record_[Rachel STILL]_[9730787751]_[01-01-2002].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-9730786968].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-9730786968].json deleted file mode 100644 index 6492024b75..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-9730786968].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "PP-6", - "bulk_upload_report": { - "FilePath": "test/9730786968/1of1_Lloyd_George_Record_[Anita EUSTON]_[119730786968]_[12-01-2003].pdf", - "NhsNumber": "9730786968", - "PdsOdsCode": "", - "Reason": "Incorrect NHS number or date format", - "StoredFileName": "test/9730786968/1of1_Lloyd_George_Record_[Anita EUSTON]_[119730786968]_[12-01-2003].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-General-Reject-Incorrect NHS Number or Date-9730786968].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-General-Reject-Incorrect NHS Number or Date-9730786968].json new file mode 100644 index 0000000000..43851dab96 --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-6-General-Reject-Incorrect NHS Number or Date-9730786968].json @@ -0,0 +1,28 @@ +{ + "_description": "PP-6-General-Reject-Incorrect NHS Number or Date", + "bulk_upload_report": { + "FilePath": "reject/test/9730786968/1of1_Lloyd_George_Record_[Anita EUSTON]_[119730786968]_[12-01-2003].pdf", + "NhsNumber": "9730786968", + "PdsOdsCode": "", + "Reason": "Incorrect NHS number or date format", + "StoredFileName": "test/9730786968/1of1_Lloyd_George_Record_[Anita EUSTON]_[119730786968]_[12-01-2003].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, + "metadata": null, + "review": { + "Author": "M85143", + "Custodian": "M85143", + "DocumentSnomedCodeType": "16521000000101", + "Files": [ + { + "FileName": "1of1_Lloyd_George_Record_[Anita EUSTON]_[119730786968]_[12-01-2003].pdf" + } + ], + "NhsNumber": "9730786968", + "ReviewReason": "Unsuccessful upload", + "ReviewStatus": "PENDING_REVIEW", + "Version": "Decimal('1')" + }, + "unstitched": null +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-9730786976].json deleted file mode 100644 index 84684378a1..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-9730786976].json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_description": "PP-7", - "bulk_upload_report": { - "FilePath": "test/9730786976/1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[19730786976]_[24-07-192].pdf", - "NhsNumber": "9730786976", - "PdsOdsCode": "", - "Reason": "Invalid NHS number", - "StoredFileName": "test/9730786976/1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[19730786976]_[24-07-192].pdf", - "UploadStatus": "failed", - "UploaderOdsCode": "M85143" - }, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-General-Reject-Invalid NHS Number-9730786976].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-General-Reject-Invalid NHS Number-9730786976].json new file mode 100644 index 0000000000..3a6942dbbe --- /dev/null +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-7-General-Reject-Invalid NHS Number-9730786976].json @@ -0,0 +1,68 @@ +{ + "_description": "PP-7-General-Reject-Invalid NHS Number", + "bulk_upload_report": { + "FilePath": "accept/9730786976/3of3_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf", + "NhsNumber": "9730786976", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "StoredFileName": "9730786976/3of3_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf", + "UploadStatus": "complete", + "UploaderOdsCode": "M85143" + }, + "metadata": { + "Author": "M85143", + "ContentType": "application/pdf", + "Created": "2026-01-29T10:48:22.815553Z", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileLocation": "s3://roga7-lloyd-george-store/9730786976/5e7be779-95b5-4a98-99fa-b46cdde0e13b", + "FileName": "1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf", + "FileSize": "Decimal('578652')", + "ID": "5e7be779-95b5-4a98-99fa-b46cdde0e13b", + "NhsNumber": "9730786976", + "S3FileKey": "9730786976/5e7be779-95b5-4a98-99fa-b46cdde0e13b", + "S3VersionID": "Pe8g7sZDkNep3Ge.JoogC5qpKMw0ZO7k", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, + "review": { + "Author": "M85143", + "Custodian": "M85143", + "DocumentSnomedCodeType": "16521000000101", + "Files": [ + { + "FileName": "1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[19730786976]_[24-07-192].pdf" + } + ], + "NhsNumber": "9730786976", + "ReviewReason": "Unsuccessful upload", + "ReviewStatus": "PENDING_REVIEW", + "Version": "Decimal('1')" + }, + "unstitched": { + "Author": "M85143", + "ContentType": "application/pdf", + "Created": "2026-01-29T10:48:23.054751Z", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentScanCreation": "2023-01-01", + "DocumentSnomedCodeType": "16521000000101", + "FileLocation": "s3://roga7-lloyd-george-store/9730786976/7465a59e-b9b2-4595-b7aa-2c187a430935", + "FileName": "3of3_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf", + "FileSize": "Decimal('173760')", + "ID": "7465a59e-b9b2-4595-b7aa-2c187a430935", + "LastUpdated": "Decimal('1769683703')", + "NhsNumber": "9730786976", + "S3FileKey": "9730786976/7465a59e-b9b2-4595-b7aa-2c187a430935", + "S3VersionID": "neH9zrPyHM8D2Nfz17RWIp0.sBJxcr4g", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + } +} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-9-9730787581].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-9-9730787581].json deleted file mode 100644 index 1d6b6abe9b..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_general_reject_ingestions[PP-9-9730787581].json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "_description": "PP-9", - "bulk_upload_report": null, - "metadata": null, - "unstitched": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_remap_and_fixed[123456789-Prevent Fixed on File and NhsNumber].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_remap_and_fixed[123456789-Prevent Fixed on File and NhsNumber].json deleted file mode 100644 index 14efd8624a..0000000000 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_remap_and_fixed[123456789-Prevent Fixed on File and NhsNumber].json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "_description": "Prevent Fixed on File and NhsNumber", - "bulk_upload_report": null, - "metadata": null -} diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename-9000000005].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename-9000000005].json index 7857aa6e0d..5bbbfa443d 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename-9000000005].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename-9000000005].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-Could not find a valid date in the filename?", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/9730153819 07-Aug-2020/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000005.pdf", + "NhsNumber": "9000000005", + "PdsOdsCode": "", + "Reason": "Could not find a valid date in the filename", + "StoredFileName": "9730153819 07-Aug-2020/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000005.pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000045].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000045].json index e0a2232a09..b37ce37046 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000045].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000045].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-Could not find a valid date in the filename.", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/1232323232 12-Aug-1999 Catherine Higgins/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000045.pdf", + "NhsNumber": "9000000045", + "PdsOdsCode": "", + "Reason": "Could not find a valid date in the filename", + "StoredFileName": "1232323232 12-Aug-1999 Catherine Higgins/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000045.pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000055].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000055].json index e0a2232a09..1c76bbdb37 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000055].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000055].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-Could not find a valid date in the filename.", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/1253617284 Adam Thomas 07-Nov-99/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000055.pdf", + "NhsNumber": "9000000055", + "PdsOdsCode": "", + "Reason": "Could not find a valid date in the filename", + "StoredFileName": "1253617284 Adam Thomas 07-Nov-99/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000055.pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000099].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000099].json index e0a2232a09..78e9242815 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000099].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Could not find a valid date in the filename.-9000000099].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-Could not find a valid date in the filename.", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/2516273843 Fiona Smith/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000099.pdf", + "NhsNumber": "9000000099", + "PdsOdsCode": "", + "Reason": "Could not find a valid date in the filename", + "StoredFileName": "2516273843 Fiona Smith/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000099.pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-File extension .tiff is not supported-9000000001].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-File extension .tiff is not supported-9000000001].json index 385f962812..e178571a3f 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-File extension .tiff is not supported-9000000001].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-File extension .tiff is not supported-9000000001].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-File extension .tiff is not supported", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/9730153752 Dawn FLING 19-Sep-2011/fgdgdf2f4e4dtd_B_1_Lloyd_George_tiff_NOS_9730153752.tiff", + "NhsNumber": "9000000001", + "PdsOdsCode": "", + "Reason": "File extension .tiff is not supported", + "StoredFileName": "9730153752 Dawn FLING 19-Sep-2011/fgdgdf2f4e4dtd_B_1_Lloyd_George_tiff_NOS_9730153752.tiff", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid NHS number-9000000088].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid NHS number-9000000088].json index 7609ff497f..e41695d2ae 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid NHS number-9000000088].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid NHS number-9000000088].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-Invalid NHS number", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/Stewart Smith 07-Sep-1998/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000088.pdf", + "NhsNumber": "9000000088", + "PdsOdsCode": "", + "Reason": "Invalid NHS number", + "StoredFileName": "Stewart Smith 07-Sep-1998/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000088.pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid date format-9000000044].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid date format-9000000044].json index d775eb5f67..ae2e9f1304 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid date format-9000000044].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid date format-9000000044].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-Invalid date format", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/1234567895 Lillian Percy 07-24-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000044.pdf", + "NhsNumber": "9000000044", + "PdsOdsCode": "", + "Reason": "Invalid date format", + "StoredFileName": "1234567895 Lillian Percy 07-24-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000044.pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000008].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000008].json index f20e67b44c..3ea04c8f7b 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000008].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000008].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-Invalid patient name", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/9730153 Louisa Gables 07-Nov-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000008.pdf", + "NhsNumber": "9000000008", + "PdsOdsCode": "", + "Reason": "Invalid NHS number", + "StoredFileName": "9730153 Louisa Gables 07-Nov-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000008.pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000067].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000067].json index f20e67b44c..506d9a637d 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000067].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Invalid patient name-9000000067].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-Invalid patient name", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/12-Aug-1944 Catherine Higgins 1992323232/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000067.pdf", + "NhsNumber": "9000000067", + "PdsOdsCode": "", + "Reason": "Invalid patient name", + "StoredFileName": "12-Aug-1944 Catherine Higgins 1992323232/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000067.pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Multi-part documents are not supported-9000000003].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Multi-part documents are not supported-9000000003].json index 2584dffbdd..64469cba1a 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Multi-part documents are not supported-9000000003].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-Multi-part documents are not supported-9000000003].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-Multi-part documents are not supported", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/9730153973 Sue Lara TEMPLE 25-Jul-2010/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of7_9730153973.pdf", + "NhsNumber": "9000000003", + "PdsOdsCode": "", + "Reason": "Multi-part documents are not supported", + "StoredFileName": "9730153973 Sue Lara TEMPLE 25-Jul-2010/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of7_9730153973.pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-no space between name and dob-9000000066].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-no space between name and dob-9000000066].json index b1a43ab7ed..bc913b02bf 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-no space between name and dob-9000000066].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_reject_bulk_upload/test_usb_reject_ingestions[USB-Rejected-no space between name and dob-9000000066].json @@ -1,6 +1,14 @@ { "_description": "USB-Rejected-no space between name and dob", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "reject-usb/9725362748 Geraldine Ellis07-Sep-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000066.pdf", + "NhsNumber": "9000000066", + "PdsOdsCode": "", + "Reason": "Could not find a valid date in the filename", + "StoredFileName": "9725362748 Geraldine Ellis07-Sep-1999/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9000000066.pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "M85143" + }, "metadata": null, "unstitched": null } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Accept-9730787158].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Accept-9730787158].json index c6b9dc1118..5cd689be58 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Accept-9730787158].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Accept-9730787158].json @@ -1,6 +1,28 @@ { "_description": "SCOD-Accept", - "bulk_upload_report": null, - "metadata": null, + "bulk_upload_report": { + "FilePath": "expedite/1of1_Lloyd_George_Record_[Felix Alfred VOS]_[9730787158]_[03-01-2016].pdf", + "NhsNumber": "9730787158", + "PdsOdsCode": "M85143", + "Reason": "Patient matched on full match 3/3, matched on 1 family_name and 2 given name", + "StoredFileName": "expedite/1of1_Lloyd_George_Record_[Felix Alfred VOS]_[9730787158]_[03-01-2016].pdf", + "UploadStatus": "complete", + "UploaderOdsCode": "expedite" + }, + "metadata": { + "Author": "expedite", + "ContentType": "application/pdf", + "CurrentGpOds": "M85143", + "Custodian": "M85143", + "DocStatus": "final", + "DocumentSnomedCodeType": "16521000000101", + "FileName": "1of1_Lloyd_George_Record_[Felix Alfred VOS]_[9730787158]_[03-01-2016].pdf", + "FileSize": "Decimal('173760')", + "NhsNumber": "9730787158", + "Status": "current", + "Uploaded": true, + "Version": "1", + "VirusScannerResult": "Clean" + }, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Reject-9730787159].json b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Reject-9730787159].json index 43e4322b50..c41adf1eaf 100644 --- a/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Reject-9730787159].json +++ b/lambdas/tests/e2e/bulk_upload/check/__snapshots__/test_scod_bulk_upload/test_scod_ingestions[SCOD-Reject-9730787159].json @@ -1,6 +1,14 @@ { "_description": "SCOD-Reject", - "bulk_upload_report": null, + "bulk_upload_report": { + "FilePath": "expedite/1of1_Lloyd_George_Record_[Felix Alfred VOS]_[9730787159]_[03-01-2016].pdf", + "NhsNumber": "9730787159", + "PdsOdsCode": "", + "Reason": "Invalid NHS number format", + "StoredFileName": "expedite/1of1_Lloyd_George_Record_[Felix Alfred VOS]_[9730787159]_[03-01-2016].pdf", + "UploadStatus": "failed", + "UploaderOdsCode": "expedite" + }, "metadata": null, "unstitched": [] } diff --git a/lambdas/tests/e2e/bulk_upload/check/test_reject_bulk_upload.py b/lambdas/tests/e2e/bulk_upload/check/test_reject_bulk_upload.py index af9ac32caf..6ae4cfe900 100644 --- a/lambdas/tests/e2e/bulk_upload/check/test_reject_bulk_upload.py +++ b/lambdas/tests/e2e/bulk_upload/check/test_reject_bulk_upload.py @@ -35,7 +35,6 @@ def bulk_upload_table_records(): "review_records": lloyd_george_data_helper.scan_review_table() } - @pytest.mark.parametrize( "description, nhs_number", general_reject_test_cases, @@ -53,6 +52,7 @@ def test_general_reject_ingestions( nhs_number, bulk_upload_table_records["bulk_upload_report_records"] ), "unstitched": get_entry_from_table_by_nhs_number(nhs_number, bulk_upload_table_records["unstitched_records"]), + "review": get_entry_from_table_by_nhs_number(nhs_number, bulk_upload_table_records["review_records"]) } assert records_by_num == snapshot_json( exclude=paths( @@ -60,9 +60,15 @@ def test_general_reject_ingestions( "bulk_upload_report.Date", "bulk_upload_report.ID", "bulk_upload_report.Timestamp", + "review.ID", + "review.UploadDate", + "review.Files.0.FileLocation", + "review.Files.1.FileLocation" ) ) - + if records_by_num["review"]["NhsNumber"] != "0000000000": + for file in records_by_num["review"]["Files"]: + assert lloyd_george_data_helper.check_review_record_exists_in_s3_with_version(file["FileLocation"]) @pytest.mark.parametrize( "description, nhs_number", @@ -90,6 +96,9 @@ def test_usb_reject_ingestions( "bulk_upload_report.Timestamp", ) ) + if records_by_num["review"]["NhsNumber"] != "0000000000": + for file in records_by_num["review"]["Files"]: + assert lloyd_george_data_helper.check_review_record_exists_in_s3_with_version(file["FileLocation"]) @pytest.mark.parametrize("nhs_number,description", [("123456789", "Prevent Fixed on File and NhsNumber")]) diff --git a/lambdas/tests/e2e/bulk_upload/conftest.py b/lambdas/tests/e2e/bulk_upload/conftest.py index dc4fd296a2..4f69eec2cf 100644 --- a/lambdas/tests/e2e/bulk_upload/conftest.py +++ b/lambdas/tests/e2e/bulk_upload/conftest.py @@ -32,20 +32,25 @@ def empty_table(table_name): dynamodb = boto3.resource("dynamodb") table = dynamodb.Table(table_name) - response = table.scan(ProjectionExpression="ID") - items = response.get("Items", []) + key_attrs = [k["AttributeName"] for k in table.key_schema] + projection_expr = ", ".join(key_attrs) + + scan_kwargs = {"ProjectionExpression": projection_expr} + response = table.scan(**scan_kwargs) - # Delete initial page with table.batch_writer() as batch: - for item in items: - batch.delete_item(Key={"ID": item["ID"]}) - - # Continue if paginated - while "LastEvaluatedKey" in response: - response = table.scan(ProjectionExpression="ID", ExclusiveStartKey=response["LastEvaluatedKey"]) - items = response.get("Items", []) - with table.batch_writer() as batch: - for item in items: - batch.delete_item(Key={"ID": item["ID"]}) + while True: + for item in response.get("Items", []): + batch.delete_item( + Key={k: item[k] for k in key_attrs} + ) + + if "LastEvaluatedKey" not in response: + break + + response = table.scan( + **scan_kwargs, + ExclusiveStartKey=response["LastEvaluatedKey"] + ) print(f"Emptied table {table_name}") diff --git a/lambdas/tests/e2e/bulk_upload/data/accept-metadata-usb.csv b/lambdas/tests/e2e/bulk_upload/data/accept-metadata-usb.csv index fc5dbe3847..c052e5dac9 100644 --- a/lambdas/tests/e2e/bulk_upload/data/accept-metadata-usb.csv +++ b/lambdas/tests/e2e/bulk_upload/data/accept-metadata-usb.csv @@ -1,3 +1,3 @@ Test-Description,FILEPATH,PAGE COUNT,GP-PRACTICE-CODE,NHS-NO,SECTION,SUB-SECTION,SCAN-DATE,SCAN-ID,USER-ID,UPLOAD -USB-Accepted-sent straight to queue (skips validation if already valid),9730153760/1of1_Lloyd_George_Record_[Ruby Sandra MANTON]_[9730153760]_[08-01-2003].pdf,1,M85143,9730153760,LG,,01/01/2023,NEC,NEC,23/11/2023 -USB-Accepted-1of1 in filename,9730153817 Haley Glenda RUDKIN 07-Aug-2023/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9730153817.pdf,1,M85143,9730153817,LG,,01/01/2023,NEC,NEC,23/11/2023 +USB-Accept-Unprocessed,9730153760/1of1_Lloyd_George_Record_[Ruby Sandra MANTON]_[9730153760]_[08-01-2003].pdf,1,M85143,9730153760,LG,,01/01/2023,NEC,NEC,23/11/2023 +USB-Accept-Processed,9730153817 Haley Glenda RUDKIN 07-Aug-2023/fgdgdf2f4e4dtd_B_1_Lloyd_George_Record_NOS_1of1_9730153817.pdf,1,M85143,9730153817,LG,,01/01/2023,NEC,NEC,23/11/2023 diff --git a/lambdas/tests/e2e/bulk_upload/data/accept-metadata.csv b/lambdas/tests/e2e/bulk_upload/data/accept-metadata.csv index c75630d9ed..5e309d4daa 100644 --- a/lambdas/tests/e2e/bulk_upload/data/accept-metadata.csv +++ b/lambdas/tests/e2e/bulk_upload/data/accept-metadata.csv @@ -1,10 +1,10 @@ Test-Description,FILEPATH,PAGE COUNT,GP-PRACTICE-CODE,NHS-NO,SECTION,SUB-SECTION,SCAN-DATE,SCAN-ID,USER-ID,UPLOAD -General-Accepted-Single File Upload,9730787026/1of1_Lloyd_George_Record_[Dora Celia HAMNET]_[9730787026]_[07-07-1926].pdf,1,M85143,9730787026,LG,,01/01/2023,NEC,NEC,21/11/2025 -General-Accepted-Multi File Upload 1of3,9730786976/1of3_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf,1,M85143,9730786976,LG,,01/01/2023,NEC,NEC,05/12/2025 -General-Accepted-Multi File Upload 2of3,9730786976/2of3_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf,2,M85143,9730786976,LG,,01/01/2023,NEC,NEC,05/12/2025 -General-Accepted-Multi File Upload 3of3,9730786976/3of3_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf,3,M85143,9730786976,LG,,01/01/2023,NEC,NEC,05/12/2025 -General-Accepted-Pre-processor LloydGeorge Name Edit,9730786925/1of1_Ll0yd_George_Record_[Harry Adam TWIST]_[9730786925]_[01-04-1925].pdf,1,M85143,9730786925,LG,,01/01/2023,NEC,NEC,05/12/2025 -General-Accepted-Pre-processor Mixed Spacing in Page,01of 01_Lloyd_George_Record_Andrea Gladys HOAKES_9730154775_09-01-2009.pdf,1,H81109,9730154775,LG,,01/01/2023,NEC,NEC,23/11/2023 -General-Accepted-Pre-processor Spacing Nhs Number,01 of 01_Lloyd_George_Record_GILALA NYSSA RUBENSTEIN_973 015 472 4_18-07-2020.pdf,1,H81109,9730154724,LG,,01/01/2023,NEC,NEC,23/11/2023 -General-Accepted-Pre-processor Hyphenated Nhs Number,01 of 01_Lloyd_George_Record_MEIXIANG XIAOLIAN FONG_973-0154-406_27-11-1944.pdf,1,H81109,9730154406,LG,,01/01/2023,NEC,NEC,23/11/2023 -General-Accepted-Pre-processor Mixed brackets,01 of 01_Lloyd George Record_[Tarina Sybill LEVY]_9730154090_14-09-1961.pdf,1,H81109,9730154090,LG,,01/01/2023,NEC,NEC,23/11/2023 +General-Accept-Single File Upload,9730787026/1of1_Lloyd_George_Record_[Dora Celia HAMNET]_[9730787026]_[07-07-1926].pdf,1,M85143,9730787026,LG,,01/01/2023,NEC,NEC,21/11/2025 +General-Accept-Multi File Upload 1of3,9730786976/1of3_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf,1,M85143,9730786976,LG,,01/01/2023,NEC,NEC,05/12/2025 +General-Accept-Multi File Upload 2of3,9730786976/2of3_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf,2,M85143,9730786976,LG,,01/01/2023,NEC,NEC,05/12/2025 +General-Accept-Multi File Upload 3of3,9730786976/3of3_Lloyd_George_Record_[Lena Rena LAWLER]_[9730786976]_[24-07-1924].pdf,3,M85143,9730786976,LG,,01/01/2023,NEC,NEC,05/12/2025 +General-Accept-Processed-LloydGeorge Name Edit,9730786925/1of1_Ll0yd_George_Record_[Harry Adam TWIST]_[9730786925]_[01-04-1925].pdf,1,M85143,9730786925,LG,,01/01/2023,NEC,NEC,05/12/2025 +General-Accept-Processed-Mixed Spacing in Page,01of 01_Lloyd_George_Record_Andrea Gladys HOAKES_9730154775_09-01-2009.pdf,1,H81109,9730154775,LG,,01/01/2023,NEC,NEC,23/11/2023 +General-Accept-Processed-Spacing Nhs Number,01 of 01_Lloyd_George_Record_GILALA NYSSA RUBENSTEIN_973 015 472 4_18-07-2020.pdf,1,H81109,9730154724,LG,,01/01/2023,NEC,NEC,23/11/2023 +General-Accept-Processed-Hyphenated Nhs Number,01 of 01_Lloyd_George_Record_MEIXIANG XIAOLIAN FONG_973-0154-406_27-11-1944.pdf,1,H81109,9730154406,LG,,01/01/2023,NEC,NEC,23/11/2023 +General-Accept-Processed-Mixed brackets,01 of 01_Lloyd George Record_[Tarina Sybill LEVY]_9730154090_14-09-1961.pdf,1,H81109,9730154090,LG,,01/01/2023,NEC,NEC,23/11/2023 diff --git a/lambdas/tests/e2e/bulk_upload/data/accept-remap-and-fixed.csv b/lambdas/tests/e2e/bulk_upload/data/accept-remap-and-fixed.csv index cf01d46758..20cc9ee9a5 100644 --- a/lambdas/tests/e2e/bulk_upload/data/accept-remap-and-fixed.csv +++ b/lambdas/tests/e2e/bulk_upload/data/accept-remap-and-fixed.csv @@ -1,2 +1,2 @@ Test-Description,file,PAGE COUNT,nhsnumber,SECTION,SUB-SECTION,SCAN-DATE,SCAN-ID,USER-ID,UPLOAD -Remap and Fixed,test/9730787492/1of1_Lloyd_George_Record_[Bob SPEAR]_[9730787492]_[05-08-1968].pdf,1,9730787492,LG,,01/01/2023,NEC,NEC,21/11/2025 +General-Accept-Remap and Fixed,test/9730787492/1of1_Lloyd_George_Record_[Bob SPEAR]_[9730787492]_[05-08-1968].pdf,1,9730787492,LG,,01/01/2023,NEC,NEC,21/11/2025 diff --git a/lambdas/tests/e2e/bulk_upload/data/reject-fixed.csv b/lambdas/tests/e2e/bulk_upload/data/reject-fixed.csv index 239b489562..1cc21551dd 100644 --- a/lambdas/tests/e2e/bulk_upload/data/reject-fixed.csv +++ b/lambdas/tests/e2e/bulk_upload/data/reject-fixed.csv @@ -1,2 +1,2 @@ Test-Description,FILEPATH,PAGE COUNT,NHS-NO,SECTION,SUB-SECTION,scandate,SCAN-ID,USER-ID,UPLOAD -Prevent Fixed on File and NhsNumber,test/9730787603/1of1_Lloyd_George_Record_[Earl Noel MCGLUE]_[9730787603]_[26-06-1963].pdf,1,M85143,9730787603,LG,,01/01/2023,NEC,NEC,21/11/2025 +General-Reject-Prevent Fixed on File and NhsNumber,test/9730787603/1of1_Lloyd_George_Record_[Earl Noel MCGLUE]_[9730787603]_[26-06-1963].pdf,1,M85143,9730787603,LG,,01/01/2023,NEC,NEC,21/11/2025 diff --git a/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv b/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv index 48d8c3e6e2..344665403f 100644 --- a/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv +++ b/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv @@ -1,10 +1,16 @@ Test-Description,FILEPATH,PAGE COUNT,GP-PRACTICE-CODE,NHS-NO,SECTION,SUB-SECTION,SCAN-DATE,SCAN-ID,USER-ID,UPLOAD -PP-2-Incorrect document path format,test/9730787573/1OF1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf,1,M85143,9730787573,LG,NULL,2023-01-01,NEC,NEC,NULL -PP-3-Invalid Lloyd_George_Record separator-Before,test/9730787263/of1_Lloyd_George_Record_[Joy DOOLEY]_[9730787263]_[07-07-2023].pdf,1,M85143,9730787263,LG,,01/01/2023,NEC,NEC,21/11/2025 -PP-4-Invalid Lloyd_George_Record,test/9730787751/1of1_Floyd_George_Record_[Rachel STILL]_[9730787751]_[01-01-2002].pdf,1,M85143,9730787751,LG,,01/01/2023,NEC,NEC,21/11/2025 -PP-6,test/9730786968/1of1_Lloyd_George_Record_[Anita EUSTON]_[119730786968]_[12-01-2003].pdf,1,M85143,9730786968,LG,,01/01/2023,NEC,NEC,21/11/2025 -PP-7,test/9730786976/1of1_Lloyd_George_Record_[Lena Rena LAWLER]_[19730786976]_[24-07-192].pdf,1,M85143,9730786976,LG,,01/01/2023,NEC,NEC,21/11/2025 -PP-9,test/9730787581/1of1_Lloyd_George_Record_[Lucien Andrew PERRY]_[9730787581]_[30-02-1959].pdf,1,M85143,9730787581,LG,,01/01/2023,NEC,NEC,21/11/2025 -PP-10,test/9730787611/1of1_Lloyd_George_Record_[Gary Jack INSKIP]_[9730787611]_[04-09-1960],1,M85143,9730787611,LG,,01/01/2023,NEC,NEC,21/11/2025 -PP-11,test/9730787735/1of1_Lloyd_GEORGE_Record_[Gemma Jeanne HIRD]_[9730787735]_[02/08/1994].pdf,1,M85143,9730787735,LG,,01/01/2023,NEC,NEC,21/11/2025 -PP-11,test/9730787735/1_of_1_LLOYD_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf,1,M85143,9730787735,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-2-General-Reject-Incorrect Path Format,test/9730787573/1OF1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf,1,M85143,9730787573,LG,NULL,2023-01-01,NEC,NEC,NULL +PP-4-General-Reject-Not a Lloyd George Record,test/9730787751/1of1_Floyd_George_Record_[Rachel STILL]_[9730787751]_[01-01-2002].pdf,1,M85143,9730787751,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-6-General-Reject-Incorrect NHS Number or Date,test/9730786968/1of1_Lloyd_George_Record_[Anita EUSTON]_[119730786968]_[12-01-2003].pdf,1,M85143,9730786968,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-7-General-Reject-Invalid NHS Number,test/9730787646/1of1_Lloyd_George_Record_[Stan Herman HOOLEY]_[19730787646]_[08-04-11959].pdf,1,M85143,9730787646,LG,,01/01/2023,NEC,NEC,21/11/2025 +PP-10-General-Reject-Invalid File Extension,test/9730787611/1of1_Lloyd_George_Record_[Gary Jack INSKIP]_[9730787611]_[04-09-1960],1,M85143,9730787611,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-3-General-Reject-Missing Files,test/9730787328/1of2_Lloyd_George_Record_[Agnes Gaynor MULLEN]_[9730787328]_[30-03-2017].pdf,1,M85143,9730787328,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-4-General-Reject-More Files than total,test/9730787735/1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf,1,M85143,9730787735,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-4-General-Reject-More Files thant total,test/9730787735/1_of1_LLOYD_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf,1,M85143,9730787735,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-6-General-Reject-NHS Number metadata mismatch,test/9730787352/1of1_Lloyd_George_Record_[Clara Kylie HOOD]_[9730787352]_[02-12-2010].pdf,1,M85143,9434765919,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-7-General-Reject-Missing Files,test/9730787182/2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf,1,M85143,9730787182,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-7-General-Reject-Missing Files,test/9730787182/2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf,1,M85143,9730787182,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-9-General-Reject-Could not find patient in PDS,test/9730787271/1of1_Lloyd_George_Record_[Kate SUMMER]_[9476281359]_[27-08-2019].pdf,1,M85143,9476281359,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-12-General-Reject-Patient Name Mismatch,test/9730787417/1of1_Lloyd_George_Record_[Notmename Andrew KINNOY]_[9730787417]_[25-12-1999].pdf,1,M85143,9730787417,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-13-General-Reject-No or Infected File,test/9730787573/1of1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf,1,M85143,9730787573,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-14-General-Reject-Corrupted File,test/9730787298/1of1_Lloyd_George_Record_[Hazel DOYLE]_[9730787298]_[08-02-2020].pdf,1,M85143,9730787298,LG,,01/01/2023,NEC,NEC,21/11/2025 diff --git a/lambdas/tests/e2e/bulk_upload/upload/test_initiate_bulk_upload.py b/lambdas/tests/e2e/bulk_upload/upload/test_initiate_bulk_upload.py index 5463bc1885..479ae99a54 100644 --- a/lambdas/tests/e2e/bulk_upload/upload/test_initiate_bulk_upload.py +++ b/lambdas/tests/e2e/bulk_upload/upload/test_initiate_bulk_upload.py @@ -20,6 +20,7 @@ def cleanup_databases(): empty_table(lloyd_george_helper.bulk_upload_table) empty_table(lloyd_george_helper.unstitched_table) empty_table(lloyd_george_helper.dynamo_table) + empty_table(lloyd_george_helper.review_table) def upload_record(record: str, pdf_path: Path, prefix=None, infected=False): @@ -104,9 +105,9 @@ def test_run_bulk_upload_rejected(): rows = read_metadata_csv(datadir, "reject-metadata.csv") for row in rows: pdf_filepath = datadir / "pdf" / "valid.pdf" - if "Infected" in row["Test-Description"]: - upload_record(row["FILEPATH"], pdf_filepath, "reject", True) - elif "Corrupted" in row["Test-Description"]: + if "BULK-13" in row["Test-Description"]: + pass + elif "BULK-14" in row["Test-Description"]: upload_corrupted_record(row["FILEPATH"], pdf_filepath, "reject") else: upload_record(row["FILEPATH"], pdf_filepath, "reject") diff --git a/lambdas/tests/e2e/helpers/data_helper.py b/lambdas/tests/e2e/helpers/data_helper.py index 26ce42339b..5b0f7b474f 100644 --- a/lambdas/tests/e2e/helpers/data_helper.py +++ b/lambdas/tests/e2e/helpers/data_helper.py @@ -203,11 +203,15 @@ def __init__(self): self.bulk_upload_table_name = "BulkUploadReport" self.metadata_processor_lambda_name = "BulkUploadMetadataProcessor" self.unstitched_table_name = "UnstitchedLloydGeorgeReferenceMetadata" - self.review_table_name = "DocumentReviewProcessor" - self.staging_bucket = "staging-bulk-store" + self.review_table_name = "DocumentUploadReview" + self.review_bucket_name = "document-pending-review-store" + self.staging_bucket_name = "staging-bulk-store" + + self.staging_bucket = None self.bulk_upload_table = None self.unstitched_table = None self.metadata_processor_lambda = None + self.review_bucket = None self.lambda_client = boto3.client("lambda") self.s3_client = boto3.client("s3") @@ -224,8 +228,9 @@ def build_env(self, table_name, bucket_name): self.bulk_upload_table = f"{self.workspace}_{self.bulk_upload_table_name}" self.metadata_processor_lambda = f"{self.workspace}_{self.metadata_processor_lambda_name}" self.unstitched_table = f"{self.workspace}_{self.unstitched_table_name}" - self.staging_bucket = f"{self.workspace}-{self.staging_bucket}" + self.staging_bucket= f"{self.workspace}-{self.staging_bucket_name}" self.review_table = f"{self.workspace}_{self.review_table_name}" + self.review_bucket = f"{self.workspace}-{self.review_bucket_name}" def scan_bulk_upload_report_table(self): return self.dynamo_service.scan_whole_table(self.bulk_upload_table or "") @@ -277,3 +282,14 @@ def check_record_exists_in_s3_with_version(self, key, version_id): return False else: raise + + def check_review_record_exists_in_s3_with_version(self, key): + s3_client = boto3.client("s3") + try: + _ = s3_client.head_object(Bucket=self.review_bucket, Key=key) + return True + except s3_client.exceptions.ClientError as e: + if e.response["Error"]["Code"] == "404": + return False + else: + raise \ No newline at end of file From 58ac887cec9b03767adce8eeb609e77763cb61a6 Mon Sep 17 00:00:00 2001 From: robg-test <106234256+robg-test@users.noreply.github.com> Date: Tue, 3 Feb 2026 11:19:18 +0000 Subject: [PATCH 3/3] [PRMP-1345] Remove Test Evidence --- lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv b/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv index 344665403f..9869a2ae08 100644 --- a/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv +++ b/lambdas/tests/e2e/bulk_upload/data/reject-metadata.csv @@ -8,8 +8,8 @@ BULK-3-General-Reject-Missing Files,test/9730787328/1of2_Lloyd_George_Record_[Ag BULK-4-General-Reject-More Files than total,test/9730787735/1of1_Lloyd_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf,1,M85143,9730787735,LG,,01/01/2023,NEC,NEC,21/11/2025 BULK-4-General-Reject-More Files thant total,test/9730787735/1_of1_LLOYD_George_Record_[Gemma Jeanne HIRD]_[9730787735]_[02-08-1994].pdf,1,M85143,9730787735,LG,,01/01/2023,NEC,NEC,21/11/2025 BULK-6-General-Reject-NHS Number metadata mismatch,test/9730787352/1of1_Lloyd_George_Record_[Clara Kylie HOOD]_[9730787352]_[02-12-2010].pdf,1,M85143,9434765919,LG,,01/01/2023,NEC,NEC,21/11/2025 -BULK-7-General-Reject-Missing Files,test/9730787182/2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf,1,M85143,9730787182,LG,,01/01/2023,NEC,NEC,21/11/2025 -BULK-7-General-Reject-Missing Files,test/9730787182/2of2_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf,1,M85143,9730787182,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-7-General-Reject-Missing Files,test/9730787182/2of3_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf,1,M85143,9730787182,LG,,01/01/2023,NEC,NEC,21/11/2025 +BULK-7-General-Reject-Missing Files,test/9730787182/3of3_Lloyd_George_Record_[Jimmy Oliver LOWERY]_[9730787182]_[15-02-2013].pdf,1,M85143,9730787182,LG,,01/01/2023,NEC,NEC,21/11/2025 BULK-9-General-Reject-Could not find patient in PDS,test/9730787271/1of1_Lloyd_George_Record_[Kate SUMMER]_[9476281359]_[27-08-2019].pdf,1,M85143,9476281359,LG,,01/01/2023,NEC,NEC,21/11/2025 BULK-12-General-Reject-Patient Name Mismatch,test/9730787417/1of1_Lloyd_George_Record_[Notmename Andrew KINNOY]_[9730787417]_[25-12-1999].pdf,1,M85143,9730787417,LG,,01/01/2023,NEC,NEC,21/11/2025 BULK-13-General-Reject-No or Infected File,test/9730787573/1of1_Lloyd_George_Record_[Alan Oscar KERNS]_[9730787573]_[27-08-1971].pdf,1,M85143,9730787573,LG,,01/01/2023,NEC,NEC,21/11/2025