Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

(feat) Patient name sorting #76

Merged
merged 10 commits into from
Apr 1, 2024
Merged

(feat) Patient name sorting #76

merged 10 commits into from
Apr 1, 2024

Conversation

icrc-psousa
Copy link
Contributor

@icrc-psousa icrc-psousa commented Mar 15, 2024

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide.
  • My work includes tests or is validated by existing tests.

Summary

When creating a group, no specific order for the patients is explicitly defined. Initially, the order established during the creation is maintained for the first session. However, for subsequent sessions, the order of patients changes, following the sequence in which they are retrieved from the database.

With this development the order of the patients within a group will always be alphabetical.

Screenshots

Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, @icrc-psousa, I've left some suggestions.

src/add-group-modal/AddGroupModal.tsx Show resolved Hide resolved
src/add-group-modal/AddGroupModal.tsx Outdated Show resolved Hide resolved
src/add-group-modal/AddGroupModal.tsx Outdated Show resolved Hide resolved
src/add-group-modal/AddGroupModal.tsx Outdated Show resolved Hide resolved
src/add-group-modal/AddGroupModal.tsx Outdated Show resolved Hide resolved
@icrc-psousa
Copy link
Contributor Author

Thanks for working on this, @icrc-psousa, I've left some suggestions.

Thanks for your input @denniskigen , I've made the suggested changes. I've also fixed the sorting on the modal not to consider the patient id so that the patient list order is always the same.

Comment on lines 64 to 66
const getPatients = async (uuids) => {
return await Promise.all(uuids.map((uuid) => fetchCurrentPatient(uuid)));
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the async and await here are superfluous.

@icrc-psousa icrc-psousa merged commit 0493326 into main Apr 1, 2024
4 checks passed
@icrc-psousa icrc-psousa deleted the feat/patient-name-sorting branch April 1, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants