msupply-foundation / mobile

Open source mobile app for medical inventory control
http://msupply.org.nz/mobile
Other
43 stars 27 forks source link

When searching online for a patient, duplicate patient alert is triggered when patient is selected #5241

Closed alainsussol closed 1 year ago

alainsussol commented 1 year ago

Describe the bug

I am not quite sure yet but it seems that sometimes I trigger the duplicate alert when selecting a patient, not just when creating a new patient. Seems to happens more consistently when I use the Search Online button.

In fact it seems that the problem happens each time I select the same patient a second time. It seems that the validation is done all the time and not just when adding a new patient but when searching too. Maybe it compare your new selected patient to the one you have selected previously when searching for a patient.

https://github.com/openmsupply/mobile/assets/11624516/7924fdbc-2343-4414-8b43-b5e81a5f4ea8

To reproduce

With Kiribati-Vax datafile Steps to reproduce the behaviour: After setup and initialisation (it is quite slow so I suggest to start it a couple of hours before you want to start testing)

  1. Go to 'Vaccination module'
  2. Use the filters
  3. Select a name
  4. If the alert is not triggered. go back.
  5. Search for a patient by clicking on the search online button
  6. search for the same name as previously
  7. select it
  8. See error.

Expected behaviour

I believe that this validation for duplicate patient should only happen when adding a new patient. I believe it should not happen when searching for a patient.

Proposed Solution

as Expected behaviour.

Version and device info

Additional context

Testing Vaccine module

arjunSussol commented 1 year ago

@alainsussol should be fixed by issue #5215 I have fixed this issue and released a rc version for now. I am going to release 8.6.6 after rc testing, and hoping that this issue should be fixed. So going to close this issue

AnushaUp commented 1 year ago

@alainsussol and @arjunSussol Tested and passed.

alainsussol commented 1 year ago

@AnushaUp Thank you :). I don't have a tablet anymore so I will not be able to retest these..

AnushaUp commented 1 year ago

@alainsussol Lets hope it wont appear again😅