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

Merging duplicate cases leads to case entities that have conflicting 'Place of stay' and 'Current Hospitalization' values #8031

Open adinaflorea9 opened 2 years ago

adinaflorea9 commented 2 years ago

Feature Description

Merging cases with different 'Place of stay' and 'Current hospitalization' values, generates case entities that have a current hospitalization, but the place of stay is set to 'Home'.

Problem Description

Steps:

  1. Create a case ('Case1') that has the 'Place of stay' set to 'Home' and no information in the 'Hospitalization' tab, 'Current Hospitalization' section;
  2. Create a case ('Case2') that has the 'Place of stay' set to 'Facility'; 'Facility category' - 'Medical facility'; 'Facility type' - 'Hospital' and in the 'Hospitalization' tab, 'Current Hospitalization' section select 'Yes';
  3. Navigate in the 'Cases' directory to the 'Merge Duplicate Cases' page (via the 'More' button at the top of the directory);
  4. Merge 'Case2' into 'Case1' (i.e. 'Case1' is the preserved case);
  5. Navigate in the 'Cases' directory to 'Case1' and observe the 'Place of stay' and the information from the 'Hospitalization' tab.

The preserved case - 'Case1' - has the 'Place of stay' set to 'Home', but it has the 'Current Hospitalization' information of 'Case2'.

Based on the behavior reported in ticket #7812 cases that have 'Yes' selected in the 'Current hospitalization' section need to have the 'Place of stay' set to a 'Facility'; 'Facility category' - 'Medical facility'; 'Facility type' - 'Hospital'.

Proposed Change

Additional Information

GIF of the steps: Merge cases

bernardsilenou commented 2 years ago

@MateStrysewske