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 143 forks source link

[Immunizations] Confirmation message is unclear when saving an immunization #8026

Open adinaflorea9 opened 2 years ago

adinaflorea9 commented 2 years ago

Bug Description

The confirmation message that appears when saving immunizations is unclear.

Steps to Reproduce

  1. Navigate to the 'Immunizations' directory and open an existing immunization;
  2. Set the ‘Means of Immunization’ to either ‘Recovery’, ‘Vaccination/Recovery’, or ‘Other’;
  3. Click ‘Save’ at the bottom of the page;
  4. Observe the confirmation message.

Actual Behavior

The confirmation message refers to vaccination: ‘Immunization data saved. The vaccination status of matching cases, contacts and event participants of the immunization person has been updated to vaccinated’.

Expected Behavior

The confirmation message should be clear and in accordance with the ‘Means of immunization’ selected.

Screenshots

Means of immunization via ‘Recovery’: Immunisation saved via recovery

Means of immunization via ‘Vaccination’: Immunisation saved via vaccination

System Details

Additional Information

Saving an immunization that has the ‘Means of immunization’ set to ‘Vaccination’ generates a more generic confirmation message.

roxanamlendea commented 2 years ago

The message ‘Immunization data saved. The vaccination status of matching cases, contacts and event participants of the immunization person has been updated to vaccinated’ appears every time the user makes a change, any change (like changing just the facility, or the jurisdiction), not only when the Means of Immunization is saved.

sergiupacurariu commented 2 years ago

@adinaflorea9 The saved confirmation message which refers to vaccinations: ‘Immunization data saved. The vaccination status of matching cases, contacts and event participants of the immunization person has been updated to vaccinated’ - is triggered whenever the saved immunization has "Immunization status" - Pending. As long as the immunization status remains "Pending" the short saved message (‘Immunization data saved.") will be displayed no matter what changes are made to that immunization. Furthermore, the change in the "Immunization status" field is related to the change in the "Management status" field or comparison of vaccination doses to actual vaccinations. Currently, I don't see anything working wrong in the code. Please take into account the behavior described above in order to update the business logic of immunization save in case this behavior is not the one expected.

adinaflorea9 commented 2 years ago

Re-tested the behavior described in the ticket.

As discussed with @sergiupacurariu, it has been decided that the ticket would be more of a change request than a bug, as the confirmation message is triggered at the correct time and when the correct set of conditions are met: when the immunization's 'Management status' is set to 'Completed', and the 'Immunization Status' is set to 'Acquired'.

The contents of the confirmation message should be changed, as currently, the message mentions the vaccination status of associated entities, even when the means of immunization is 'Recovery' or 'Other' and no vaccines are listed on the immunization.

Proposed solution: -> display only the 'Immunization data saved' message when the immunization's 'Management status' is set to 'Completed', and the 'Immunization Status' is set to 'Acquired', and the means of immunization was 'recovery' or 'other';

-> only display the ‘Immunization data saved. The vaccination status of matching cases, contacts and event participants of the immunization person has been updated to vaccinated’ when the immunization's 'Management status' is set to 'Completed', and the 'Immunization Status' is set to 'Acquired', and the means of immunization was 'vaccination' or 'vaccination/recovery'.

@kwa20 and @MateStrysewske could you please provide your input on whether the proposed solution would be suitable?