Open nihal467 opened 2 weeks ago
Who need this sort?
This sorting was introduced after request from TeleICU Hubs to allow doctors to see the most severe cases on top
@aparnacoronasafe we can make it a filter, sorting doesn't make sense, can you specify the use case.
I still think severity wise sorting is needed. The doctors in 1 glance would want to know how many severe patients are there and so on.
Describe the bug
When sorting the patient list by "High severity" or "Lowest Severity," the cards are currently being sorted based on the patient category from the initial consultation form. However, the sorting should be done using the most recent patient category from the log updates, if available.
Context: The patient category is assigned during the creation of a patient consultation, but it can be updated later through the log update functionality. When sorting the patient list, the system should first check if any log updates exist for a patient. If a log update is present, the patient should be sorted based on the category in the latest log update. If no log update exists, the category from the consultation form should be used for sorting.
To Reproduce Steps to reproduce the behavior
Create a patient
Expected behavior
Screenshots