prime-simplereport
prime-simplereport copied to clipboard
[Bug] Submitting a test result will intermittently trigger patient to be added to queue
Description
Creating a bug ticket to track behavior I haven't been able to predictably reproduce, where submitting a test card for a patient can sometimes cause them to be added to the queue again.
Steps to reproduce
This is intermittent, but when it does happen it looks like this:
- submit a test card for a patient
- two success toasts pop up: 1 says successfully submitted the result and the other says successfully added patient to queue. a new test card for the patient is in the queue
Expected behavior
Submitting a test result should not cause another test card to be created
Additional context
Recording of bug: https://github.com/user-attachments/assets/15d69652-f243-4b2c-a1ee-bcbab63f9a97
Screenshot of logs showing the request to add patient to queue happening 1 second after the results are submitted:
I think after we submit we are reloading the queue page with some state or something that we used to originally redirect from the patients page and put the person in the queue.