Severity Based Sort By in patient list page is malfunctioning
Closed this issue · 8 comments
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
- Go to patient tab and create a new patient
- Once you successfully created a patient , in the patient dashboard click on the log update button
- then create a new log update with different patient category mentioned from consultation
- submit the form and return back the patient tab
- apply the sort by based on high severity
- See error
Expected behavior
- When sorting by "High severity," the order should be:
Actively dying → Critical → Moderate → Mild → Comfort Care - For sorting by "Lowest Severity," the order should be the reverse:
Comfort Care → Mild → Moderate → Critical → Actively dying.
Screenshots
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.
What's the status with this? @bodhish @rithviknishad ?
Keeping it on hold;
I am interested to work on this issue if relevant? @Jacobjeevan @rithviknishad
not a valid issue based on the current develop