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

[Closes #115] Display a table of all patients #146

Merged
merged 58 commits into from
Nov 1, 2024
Merged

[Closes #115] Display a table of all patients #146

merged 58 commits into from
Nov 1, 2024

Conversation

samau3
Copy link
Contributor

@samau3 samau3 commented Oct 22, 2024

Closes #115.

This PR adds a page to view a table of all patients, with buttons to search patients, view a patient profile, and delete a patient profile.

Here's a summary of the features implemented:

  • Patients List Page: Displays all patients fetched from the database.
  • API Route - List Patients: Created a route to retrieve all patients, with support for filtering, pagination, and search functionality.
  • Patient Profile Links: Each patient in the table is linked to their respective profile page.
  • Search Bar: Allows users to search for patients by name.
  • Pagination: Supports pagination to navigate through larger lists of patient records.
  • Delete Patient Feature: Enables patient deletion, limited to users with an admin role.
  • API Route - Delete Patient: Added an API endpoint to handle patient deletion requests.

An additional things to note is that the patient table rows are memo-ized to help reduce unnecessary rendering of the patient data table components.

Patients table with searching:

Patients Table

Patients table delete patient profile:

Patients Table Delete Success

Features moved to separate PR/issue if necessary:

  • Renewal status
  • Create a new patient profile from the header
  • Ability to view/reprint a patient's QR code

samau3 added 30 commits October 20, 2024 18:39
The option include causes an error if passed as an argument for count() so it needs to be extracted from options
@samau3 samau3 marked this pull request as ready for review October 28, 2024 01:28
@samau3 samau3 requested a review from francisli October 28, 2024 01:28
@francisli francisli merged commit 85ab24e into dev Nov 1, 2024
1 check passed
@francisli francisli deleted the issue-115 branch November 1, 2024 01:03
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.

Admin/Staff/Volunteer user can view a list of Patients
2 participants