Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

feat(patient): add paging and sorting functionality #2026

Merged
merged 65 commits into from
Jun 8, 2020

Conversation

akshay-ap
Copy link
Contributor

@akshay-ap akshay-ap commented Apr 28, 2020

Fixes #1969

Changes proposed in this pull request:

  • New component PageComponent (Shows: Previous Button, Current Page Number, Next Button)
  • PageRequest Interface
  • Wrap Patient[] in Page<Patient>
  • Add index on Patient
  • Add methods searchPaged and findAllPaged in PatientRepository
  • Changes in test cases

@vercel
Copy link

vercel bot commented Apr 28, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hospitalrun/hospitalrun-frontend/44krzducf
✅ Preview: https://hospitalrun-frontend-git-fork-akshay-ap-feat-1969.hospitalrun.now.sh

@gitpod-io
Copy link

gitpod-io bot commented Apr 28, 2020

@akshay-ap
Copy link
Contributor Author

  • Added methods searchPaged and findAllPaged in PatientRepository to avoid any breaking changes in other Components.
    Once changes looks good, searchPaged can be replaced with serach and findAllPaged with findAllPaged respectively and paging can be extended to Labs.

@akshay-ap
Copy link
Contributor Author

@jackcmeyer, I think test cases are failing because there is no indexing on Patients while mocking PatientRepository. Can you please suggest how to fix this?

@matteovivona matteovivona changed the title [WIP] Feat #1969 [WIP] feat(patient): add paging and sorting functionality Apr 29, 2020
@matteovivona matteovivona added this to In progress in Version 2.0 via automation Apr 29, 2020
@matteovivona matteovivona added this to the v2.0 milestone Apr 29, 2020
@matteovivona matteovivona added in progress indicates that issue/pull request is currently being worked on patients issue/pull request that interacts with patients module labels Apr 29, 2020
Copy link
Member

@jackcmeyer jackcmeyer left a comment

Choose a reason for hiding this comment

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

@jackcmeyer, I think test cases are failing because there is no indexing on Patients while mocking PatientRepository. Can you please suggest how to fix this?

It seems like the only issue that you are missing is that searchPaged needs to be mocked in the ViewPatients.test.tsx suite.

src/clients/Page.ts Outdated Show resolved Hide resolved
src/clients/db/PageRequest.ts Outdated Show resolved Hide resolved
src/patients/patients-slice.ts Outdated Show resolved Hide resolved
src/clients/db/Repository.ts Outdated Show resolved Hide resolved
src/clients/db/PatientRepository.ts Outdated Show resolved Hide resolved
src/clients/db/PatientRepository.ts Show resolved Hide resolved
Copy link
Member

@jackcmeyer jackcmeyer left a comment

Choose a reason for hiding this comment

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

This is definitely headed down the right path! nice work @akshay-ap!

@matteovivona
Copy link
Contributor

@akshay-ap do you need help?

@akshay-ap
Copy link
Contributor Author

@akshay-ap do you need help?

Any kind of help will be welcome!!! Code review, contribution, suggestions for this PR. :)

@akshay-ap akshay-ap requested a review from jackcmeyer May 31, 2020 16:41
@matteovivona matteovivona added the help wanted indicates that an issue is open for contributions label Jun 7, 2020
@fox1t fox1t merged commit 8089564 into HospitalRun:master Jun 8, 2020
Version 2.0 automation moved this from In progress to Done Jun 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted indicates that an issue is open for contributions in progress indicates that issue/pull request is currently being worked on patients issue/pull request that interacts with patients module
Projects
Version 2.0
  
Done
Development

Successfully merging this pull request may close these issues.

Add paging and sorting functionality to find all/search functionality
5 participants