SORMAS-Foundation / SORMAS-Project

SORMAS (Surveillance, Outbreak Response Management and Analysis System) is an early warning and management system to fight the spread of infectious diseases.
https://sormas.org
GNU General Public License v3.0
293 stars 142 forks source link

Automatically (Soft-)Delete Samples & Pathogen Tests with Negative Test Results for COVID-19 [3] #13159

Closed markusmann-vg closed 1 week ago

markusmann-vg commented 3 weeks ago

Problem Description

As a system administrator for the Luxembourg health department, I want to automatically soft-delete samples with negative test results for COVID-19, so that the system can be kept clean of irrelevant test data and maintain database efficiency.

Proposed Change

Added Value/Benefit

Database Optimization: Automatically removing irrelevant data such as negative test results helps keep the database leaner and more efficient. This reduces the amount of unnecessary data stored, improving overall system performance, including query response times and storage management.

Data Hygiene and Quality: Keeping the database free of outdated or irrelevant negative test results helps maintain data cleanliness, reducing the risk of errors and inconsistencies when working with the data. This is crucial for public health systems where the quality of information is vital.

Automated Data Management: Automating the soft-deletion process reduces the need for manual intervention, saving time for system administrators and health department staff. This also minimizes the risk of human error, ensuring that irrelevant data is consistently and accurately managed.

Acceptance Criteria

Nightly Job Extension:

The query must capture samples that meet the following conditions: => Search negative covid-19 pathogen-tests => delete pathogen-tests

Soft Delete Implementation:

Implementation Details

No response

Mockups

No response

Additional Information

Out of scope Event-Participant Disease Management (UI Warning if the automatic deletion is below x days)

No response

leventegal-she commented 1 week ago

To be added to the release notes:

New configuration property: negativeCovidTestsMaxAgeDays: Number of days after which negative CORONAVIRUS pathogen tests and their samples are soft deleted default: not set, meaning no delete possible values: any integer representing the number of days

richardbartha commented 2 days ago

Tested on localhost version 1.99.0 - SNAPSHOT (https://github.com/SORMAS-Foundation/SORMAS-Project/commits/0c557021cc987a83391e4d054f44f55ede18e358)