This pull request includes changes to the PatientModule.cs, PdsService.cs, DataHubFhirClient.cs, and PdsServiceTests.cs files, and adds new test sample files. The changes primarily focus on handling invalid patient data, improving error handling, and refactoring test code for better readability.
Changes to error handling and patient data processing:
tests/Unit.Tests/Core/Pds/PdsServiceTests.cs: Added new dependencies and refactored test setup and execution to handle the new logic for invalid patient data. [1][2][3][4][5][6][7][8]This pull request introduces significant changes to the PdsService class, and its corresponding tests, to improve the handling of patient data. The main changes are the introduction of a new method to delete patients by ID, handling of invalid patients, and refactoring of the test suite to improve readability and maintainability.
Changes to the PdsService class:
Added new methods for handling invalid PDS patients, deleting patients by their NHS number, and calling FHIR convert and updating resources. [1][2]
This pull request includes changes to the
PatientModule.cs
,PdsService.cs
,DataHubFhirClient.cs
, andPdsServiceTests.cs
files, and adds new test sample files. The changes primarily focus on handling invalid patient data, improving error handling, and refactoring test code for better readability.Changes to error handling and patient data processing:
src/Infrastructure/DataHub/Clients/DataHubFhirClient.cs
: Upgraded the log level from Debug to Error when a resource is not found in the FHIR service.Changes to test setup and execution:
tests/Unit.Tests/Core/Pds/PdsServiceTests.cs
: Added new dependencies and refactored test setup and execution to handle the new logic for invalid patient data. [1] [2] [3] [4] [5] [6] [7] [8]This pull request introduces significant changes to thePdsService
class, and its corresponding tests, to improve the handling of patient data. The main changes are the introduction of a new method to delete patients by ID, handling of invalid patients, and refactoring of the test suite to improve readability and maintainability.Changes to the
PdsService
class:Changes to the
PdsServiceTests
class:tests/Integration.Tests/Core/Pds/PdsServiceTests.cs
: Refactored the test suite to improve readability and maintainability. Introduced helper methodsCreatePatient
,CreateDummyMeshPatientMessage
and removed redundant code. [1] [2] [3] [4]Changes to the
PdsServiceTests
class:tests/Unit.Tests/Core/Pds/PdsServiceTests.cs
: Refactored the test suite to improve readability and maintainability. Introduced helper methods and removed redundant code. [1] [2] [3] [4] [5] [6] [7] [8]tests/Unit.Tests/Core/Pds/PdsServiceTests.cs
Introduced two new unit tests for delete case and merge case[x] Tests
Stories: #AD27863, #AD30271