Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Patient search results sorted by created date #5395

Closed
GaryWilletts opened this issue Dec 14, 2023 · 7 comments · Fixed by #5421
Closed

Patient search results sorted by created date #5395

GaryWilletts opened this issue Dec 14, 2023 · 7 comments · Fixed by #5421

Comments

@GaryWilletts
Copy link

GaryWilletts commented Dec 14, 2023

Is your feature request related to a problem? Please describe.

PLM Sierra Leone want patients to be sorted by their created date.

Describe the solution you'd like

Patient records returned form the search function sorted by created date in this window:

image

Implementation

  1. Add a new store preference "mobile: patient search sorted by created date" in mSupply
  2. If this preference is checked, the patient search window shown above has an extra "Created date" column and the patients are sorted by their created date, most recent at the top.
  3. The "Created date" is sortable i.e. you can click on it to sort by that column, same as the other columns.
  4. If a new patient is added it must be added to the top of the list if this preference is turned on (not sure what it does now, it might already do this).

Describe alternatives you've considered

This has been agreed with PLM.

Additional context

Requested by PLM Sierra Leone, paid for by them

MoneyWorks jobcode

PLM:MOB03

@GaryWilletts
Copy link
Author

@mark-prins or @arjunSussol please let me know when this will be complete so that I can let PLM know.

@sah-arjun
Copy link
Contributor

@GaryWilletts @mark-prins can I look at this issue?

@mark-prins
Copy link
Contributor

yes please! thanks @arjunSussol

@sah-arjun
Copy link
Contributor

@GaryWilletts pending this issue as @sanjeevsussol priorities desktop issue over mobile.

sah-arjun added a commit that referenced this issue Jan 5, 2024
#5395 preference applied to visible created date column in patient
@sah-arjun
Copy link
Contributor

sah-arjun commented Jan 8, 2024

Hi @GaryWilletts after standup discussion, I am going to add this Created date column as general column without using the store preference.

Reasons behind it:

  1. It will be easier to introduce the column for all clients without any store preference
  2. Recently, there is two different types of patient list visible; one for general list for all and another if usingAdverseDrugReactions is enabled then one extra column for adverse reaction will be added.
  3. If we are going to add another store preference to show created date column then either we have to show created date column with/without the adverse reaction column. We can bypass the adverse reaction column and show the created date column as general list. If we are going to show both columns then we have add another patient list and handle the store preference which takes more time.
  4. Recently visibility of patient list is handle in two way only. If we are going with above point 3 then we have to handle the list in three or four different way.
  5. If we are going to show the created date column by default to both patient list then no need to add store preference, less work and no more conflict.

Anyway, please let me know about your opinion!
PR also submitted, please review it too.

sah-arjun added a commit that referenced this issue Jan 8, 2024
@sanjeevsussol sanjeevsussol linked a pull request Jan 9, 2024 that will close this issue
9 tasks
@AnushaUp
Copy link

AnushaUp commented Jan 9, 2024

Testing

Tested in mSupply server V7-11-02 mobile V8.6.8-rc-2
Steps to reproduce or otherwise test the changes of this PR:

  • Test with Sierra Leone and Kiribati data
  • Setup mobile with dispensary store
  • Go to Dispensing
  • There should be Created date column visible to the patient list
  • If you create a patient then the created date will be added as current date
  • Sorting > if your list is sorted by created date then the addition of new patient will be visible at top of list.
  • Similarly, if list is sorted by firstName or lastName or any other column then the the new patient be visible as per sorted column.
  • Snapshot for reference
Screen Shot 2024-01-08 at 16 29 27

@GaryWilletts
Copy link
Author

@arjunSussol adding the column with no store preference is fine.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants