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

Prescriptions: Shrink discontinued prescriptions + Flip MAR timeline + Freeze primary columns in horizontal scroll #6282

Merged
merged 11 commits into from
Sep 21, 2023

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Sep 13, 2023

WHAT

🤖 Generated by Copilot at 0a74227

This pull request improves the user interface and functionality of the prescription administration feature. It adds the ability to view and manage discontinued prescriptions, displays more relevant information in a fixed column, and sorts the administration slots and cells by recency. It also relaxes the type restriction for the query parameter of the list action to support more flexible filtering.

Required Backends

Proposed Changes

image image image

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖 Generated by Copilot at 0a74227

  • Add state variables and logic to toggle the display of discontinued prescriptions in the table (link, link, link)
  • Modify the refetch function to use filters based on the showDiscontinued state variable and the existing query parameters (link)
  • Modify the table header and row to make the first column sticky and include the dosage and frequency information in it (link, link, link)
  • Reverse the order of the administration slots and cells to show the most recent ones first (link, link)
  • Modify the pagination buttons to go to the next or previous 24 hours and add tooltips for clarity (link, link)
  • Modify the type of the query parameter for the list action in src/Redux/actions.tsx to allow any string, boolean or number value instead of only Partial (link)

@rithviknishad rithviknishad requested a review from a team September 13, 2023 10:50
@rithviknishad rithviknishad requested a review from a team as a code owner September 13, 2023 10:50
@vercel
Copy link

vercel bot commented Sep 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 21, 2023 5:38am

@netlify
Copy link

netlify bot commented Sep 13, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 669c3be
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/650bd6b4dd1c720008576a8f
😎 Deploy Preview https://deploy-preview-6282--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@cypress
Copy link

cypress bot commented Sep 13, 2023

Passing run #1241 ↗︎

0 71 0 0 Flakiness 0

Details:

Merge 38a12f4 into cc6b570...
Project: CARE Commit: e5c22b021b ℹ️
Status: Passed Duration: 07:20 💡
Started: Sep 13, 2023 3:39 PM Ended: Sep 13, 2023 3:47 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@cypress
Copy link

cypress bot commented Sep 19, 2023

Passing run #1293 ↗︎

0 75 0 0 Flakiness 0

Details:

Prescriptions: Shrink discontinued prescriptions + Flip MAR timeline + Freeze pr...
Project: CARE Commit: 669c3bef18
Status: Passed Duration: 03:01 💡
Started: Sep 21, 2023 5:41 AM Ended: Sep 21, 2023 5:44 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@nihal467
Copy link
Member

nihal467 commented Sep 20, 2023

@rithviknishad
image

it is showing time and date 24 hours in future, in the left-most, it should be the latest administration

image

https://deploy-preview-6282--care-net.netlify.app/facility/ba496a1e-9f22-476b-b522-49afcee92bd8/patient/c278ebfa-5f30-4f9b-8f23-3acfd158f46c/consultation/e9bb8027-782a-41f4-b7e6-89f617f346a0/medicines

it is hard to execute an administration (discussion)

@rithviknishad
Copy link
Member Author

@nihal467 the snap to 24 hours to future bug has been fixed

image

@nihal467
Copy link
Member

lgtm

@khavinshankar khavinshankar merged commit 5009a86 into develop Sep 21, 2023
50 of 52 checks passed
@khavinshankar khavinshankar deleted the prescriptions/enhancements/discontinued branch September 21, 2023 05:54
@github-actions
Copy link

@rithviknishad We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

rithviknishad added a commit that referenced this pull request Oct 3, 2023
…imeline + Freeze primary columns in horizontal scroll (#6282)"

This reverts commit 5009a86.
khavinshankar pushed a commit that referenced this pull request Oct 3, 2023
…imeline + Freeze primary columns in horizontal scroll (#6282)" (#6386)

This reverts commit 5009a86.
Ashesh3 pushed a commit that referenced this pull request Oct 4, 2023
…imeline + Freeze primary columns in horizontal scroll (#6282)" (#6386)

This reverts commit 5009a86.
khavinshankar pushed a commit that referenced this pull request Oct 17, 2023
* Middleware override feature in asset location

* Fix tooltip clipping

* Fix Flaky Cypress test in Facility Module  (#6384)

* fix random facility page failure

* fix random facility page failure

* Revert "Prescriptions: Shrink discontinued prescriptions + Flip MAR timeline + Freeze primary columns in horizontal scroll (#6282)" (#6386)

This reverts commit 5009a86.

* Refactor Asset Model Import Formatting (#6388)

* Refactor Asset Model Import Formatting

* fixes to warranty_amc_end_of_validity

* Fix asset import file for cypress

* Refactor: replaced Dispatch to useQuery/Request of src/Components/Auth/log… (#6333)

* Refactor: replaced useDispatch to useQuery of src/Components/Auth/login.tsx

* fix:useQuery changed to Request

* feat: replaced dispatch with request

* fix: types and added pathparams

* fix: request body error

* Update Login.tsx

* change:Tres to Tbody

* fixes: response type change

* Update package-lock.json

* fix hover height (#6352)

* Split routes of App Router (#6363)

* Prescription: show prescribed on & by and discontinued date in detail card (#6365)

* Fixed bug in location picker in update facility page (#6377)

* add all cases for map rendering

* implement location pointer on searched location

* Added cam auto reset in asset config page (#6375)

* 💊 Adds support for editing prescriptions +  Adds `useSlug` hook (#6369)

* Adds hook: `useSlug`

* bug fix: NumericWithUnits field not showing intial value

* Form: support for showing global errors

* Adds support for editing prescriptions (fixes #6340)

* Fix cypress

* fix cypress

* Improve design

---------

Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com>
Co-authored-by: Rithvik Nishad <mail@rithviknishad.dev>
Co-authored-by: Aaron Jevil Nazareth <93522968+jevil25@users.noreply.github.com>
Co-authored-by: Pranshu Aggarwal <70687348+Pranshu1902@users.noreply.github.com>
Co-authored-by: Gampa Sri Harsh <114745442+sriharsh05@users.noreply.github.com>
Co-authored-by: Tasnimul H. Tauhid <thtauhid.71@gmail.com>
rithviknishad added a commit that referenced this pull request Oct 17, 2023
* Middleware override feature in asset location

* Fix tooltip clipping

* Fix Flaky Cypress test in Facility Module  (#6384)

* fix random facility page failure

* fix random facility page failure

* Revert "Prescriptions: Shrink discontinued prescriptions + Flip MAR timeline + Freeze primary columns in horizontal scroll (#6282)" (#6386)

This reverts commit 5009a86.

* Refactor Asset Model Import Formatting (#6388)

* Refactor Asset Model Import Formatting

* fixes to warranty_amc_end_of_validity

* Fix asset import file for cypress

* Refactor: replaced Dispatch to useQuery/Request of src/Components/Auth/log… (#6333)

* Refactor: replaced useDispatch to useQuery of src/Components/Auth/login.tsx

* fix:useQuery changed to Request

* feat: replaced dispatch with request

* fix: types and added pathparams

* fix: request body error

* Update Login.tsx

* change:Tres to Tbody

* fixes: response type change

* Update package-lock.json

* fix hover height (#6352)

* Split routes of App Router (#6363)

* Prescription: show prescribed on & by and discontinued date in detail card (#6365)

* Fixed bug in location picker in update facility page (#6377)

* add all cases for map rendering

* implement location pointer on searched location

* Added cam auto reset in asset config page (#6375)

* 💊 Adds support for editing prescriptions +  Adds `useSlug` hook (#6369)

* Adds hook: `useSlug`

* bug fix: NumericWithUnits field not showing intial value

* Form: support for showing global errors

* Adds support for editing prescriptions (fixes #6340)

* Fix cypress

* fix cypress

* Improve design

---------

Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com>
Co-authored-by: Rithvik Nishad <mail@rithviknishad.dev>
Co-authored-by: Aaron Jevil Nazareth <93522968+jevil25@users.noreply.github.com>
Co-authored-by: Pranshu Aggarwal <70687348+Pranshu1902@users.noreply.github.com>
Co-authored-by: Gampa Sri Harsh <114745442+sriharsh05@users.noreply.github.com>
Co-authored-by: Tasnimul H. Tauhid <thtauhid.71@gmail.com>
Ashesh3 added a commit that referenced this pull request Oct 20, 2023
* Middleware override feature in asset location

* Fix tooltip clipping

* Fix Flaky Cypress test in Facility Module  (#6384)

* fix random facility page failure

* fix random facility page failure

* Revert "Prescriptions: Shrink discontinued prescriptions + Flip MAR timeline + Freeze primary columns in horizontal scroll (#6282)" (#6386)

This reverts commit 5009a86.

* Refactor Asset Model Import Formatting (#6388)

* Refactor Asset Model Import Formatting

* fixes to warranty_amc_end_of_validity

* Fix asset import file for cypress

* Refactor: replaced Dispatch to useQuery/Request of src/Components/Auth/log… (#6333)

* Refactor: replaced useDispatch to useQuery of src/Components/Auth/login.tsx

* fix:useQuery changed to Request

* feat: replaced dispatch with request

* fix: types and added pathparams

* fix: request body error

* Update Login.tsx

* change:Tres to Tbody

* fixes: response type change

* Update package-lock.json

* fix hover height (#6352)

* Split routes of App Router (#6363)

* Prescription: show prescribed on & by and discontinued date in detail card (#6365)

* Fixed bug in location picker in update facility page (#6377)

* add all cases for map rendering

* implement location pointer on searched location

* Added cam auto reset in asset config page (#6375)

* 💊 Adds support for editing prescriptions +  Adds `useSlug` hook (#6369)

* Adds hook: `useSlug`

* bug fix: NumericWithUnits field not showing intial value

* Form: support for showing global errors

* Adds support for editing prescriptions (fixes #6340)

* Fix cypress

* fix cypress

* Improve design

---------

Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com>
Co-authored-by: Rithvik Nishad <mail@rithviknishad.dev>
Co-authored-by: Aaron Jevil Nazareth <93522968+jevil25@users.noreply.github.com>
Co-authored-by: Pranshu Aggarwal <70687348+Pranshu1902@users.noreply.github.com>
Co-authored-by: Gampa Sri Harsh <114745442+sriharsh05@users.noreply.github.com>
Co-authored-by: Tasnimul H. Tauhid <thtauhid.71@gmail.com>
Ashesh3 added a commit that referenced this pull request Oct 23, 2023
* Middleware override feature in asset location

* Fix tooltip clipping

* Fix Flaky Cypress test in Facility Module  (#6384)

* fix random facility page failure

* fix random facility page failure

* Revert "Prescriptions: Shrink discontinued prescriptions + Flip MAR timeline + Freeze primary columns in horizontal scroll (#6282)" (#6386)

This reverts commit 5009a86.

* Refactor Asset Model Import Formatting (#6388)

* Refactor Asset Model Import Formatting

* fixes to warranty_amc_end_of_validity

* Fix asset import file for cypress

* Refactor: replaced Dispatch to useQuery/Request of src/Components/Auth/log… (#6333)

* Refactor: replaced useDispatch to useQuery of src/Components/Auth/login.tsx

* fix:useQuery changed to Request

* feat: replaced dispatch with request

* fix: types and added pathparams

* fix: request body error

* Update Login.tsx

* change:Tres to Tbody

* fixes: response type change

* Update package-lock.json

* fix hover height (#6352)

* Split routes of App Router (#6363)

* Prescription: show prescribed on & by and discontinued date in detail card (#6365)

* Fixed bug in location picker in update facility page (#6377)

* add all cases for map rendering

* implement location pointer on searched location

* Added cam auto reset in asset config page (#6375)

* 💊 Adds support for editing prescriptions +  Adds `useSlug` hook (#6369)

* Adds hook: `useSlug`

* bug fix: NumericWithUnits field not showing intial value

* Form: support for showing global errors

* Adds support for editing prescriptions (fixes #6340)

* Fix cypress

* fix cypress

* Improve design

---------

Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com>
Co-authored-by: Rithvik Nishad <mail@rithviknishad.dev>
Co-authored-by: Aaron Jevil Nazareth <93522968+jevil25@users.noreply.github.com>
Co-authored-by: Pranshu Aggarwal <70687348+Pranshu1902@users.noreply.github.com>
Co-authored-by: Gampa Sri Harsh <114745442+sriharsh05@users.noreply.github.com>
Co-authored-by: Tasnimul H. Tauhid <thtauhid.71@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prescription : Freeze columns Prescriptions Table: Shrink discontinued medicine to one row
3 participants