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

Patient Review feature fixes #3584

Merged
merged 7 commits into from
Oct 21, 2022
Merged

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Sep 14, 2022

Fixes #1255

Since review_time is actually not stored in the database, rather just used to calculate the next review time as a DateTime field and stored in the Patient model, we do not need to show this field when updating an existing consultation, since we have no stored value for this field.

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

During Creation:
image

During Updation:
image

@Ashesh3 Ashesh3 requested a review from a team September 14, 2022 11:48
@Ashesh3 Ashesh3 requested a review from a team as a code owner September 14, 2022 11:48
@netlify
Copy link

netlify bot commented Sep 14, 2022

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 156f008
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6352bd2de1aaaf0008179b34
😎 Deploy Preview https://deploy-preview-3584--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 settings.

@rithviknishad
Copy link
Member

@Ashesh3 can you merge the latest develop, as there's a new mandatory field category added in the consultation form, hence form submission without this field would be rejected by the API.

@Ashesh3
Copy link
Member Author

Ashesh3 commented Sep 15, 2022

@Ashesh3 can you merge the latest develop, as there's a new mandatory field category added in the consultation form, hence form submission without this field would be rejected by the API.

Thanks for the heads up! Done.

Copy link
Contributor

@developedBySJ developedBySJ left a comment

Choose a reason for hiding this comment

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

LGTM

@nihal467
Copy link
Member

nihal467 commented Sep 21, 2022

@aparnacoronasafe can you look this PR after checking the DM in the slack

@nihal467 nihal467 added the question Further information is requested label Sep 21, 2022
@aparnacoronasafe
Copy link
Member

aparnacoronasafe commented Sep 23, 2022

@rithviknishad @Ashesh3 @developedBySJ

The review time needs to be stored in the BD and shown in the edit consultation form.

A detailed explanation of what needs to be done is added to the issue #1255 Please refer to it

@Ashesh3 Ashesh3 changed the title Show review time only on creation Patient Review feature fixes Sep 28, 2022
@Ashesh3
Copy link
Member Author

Ashesh3 commented Sep 28, 2022

@aparnacoronasafe I have made the required changes, a summary of the current implementation is as follows:

  • The user is now able to set a review time in the consultation/edit consultation form or at any time in the log update form.
    image

  • When a log update is filed for the patient, the preselected review time now comes pre-filled in the 'review after' field in log update and is also available to edit on the Consultation form.

Consultation Form: (Stored Value auto filled)
image
Daily Rounds Form: (Stored Value auto filled)
image

  • After review time is set, then within that time if a Log Update is not filed for the patient, then the "Review Missed" Badge appears on the Patient badge, on the Patient list page, on patient summary page and on the patient details page.
    image
    image
    image

  • After review time is set, then the "Next review" time appears on the Patient Summary and Patient details page. (Note that review is not missed in this scenario, it shows just the future date for next review)
    image
    image

  • With every log update filed, the review clock resets to the next date according to the Review time set.
    image

  • If the user does not edit the 'review after' field in Log Update form, the same interval will continue for review, with the review call resetting with every log update.
    image

Sample Workflow:

  • At 12:00, You file a 30 mins review time for a patient
  • Next review time is shown as 12:30
  • You make a review at 12:15, keeping the review time as previous (30 mins) [You do have an option to change it]
  • Next review time automatically shows as 12:45 now (12:15 + 30 mins)
  • You miss the review, A "Review missed" badge is shown now since the time review was missed.
  • It's 1:00 now, you file a log update, but this time you decide to change the review time to 2 hours (instead of previous 30 minutes).
  • Now next review time shows as 3:00 (1:00 + 2 hours)
  • You file an update at 2:00
  • Next review time shows as 4:00 now (2:00 + 2 hours)

@aparnacoronasafe
Copy link
Member

@Ashesh3

Great job at summarizing all the changes..:-)

However, I think the code is breaking somewhere. Tried testing this patient (https://deploy-preview-3584--care-net.netlify.app/facility/7ab27974-32c8-4e36-bdf9-dbf102524718/patient/cc52390c-ac8a-4af5-9806-f3df7ee1795a/consultation/7037609e-3c25-45ed-bfd8-e01c346cbd45)
Multiple log updates are filed, but the review missed badge stays.

Please check.

@github-actions
Copy link

👋 Hi, @Ashesh3,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@Ashesh3 Ashesh3 removed the merge conflict pull requests with merge conflict label Oct 12, 2022
@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Oct 12, 2022
@github-actions
Copy link

👋 Hi, @Ashesh3,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@Ashesh3 Ashesh3 added needs testing and removed waiting for backend merge conflict pull requests with merge conflict labels Oct 12, 2022
@nihal467
Copy link
Member

@Ashesh3

can you merge the latest development branch

@Ashesh3
Copy link
Member Author

Ashesh3 commented Oct 20, 2022

@nihal467 Done.

@nihal467
Copy link
Member

test approved

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Oct 21, 2022
@github-actions
Copy link

👋 Hi, @Ashesh3,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

src/Components/Patient/DailyRounds.tsx Outdated Show resolved Hide resolved
@Ashesh3 Ashesh3 removed the merge conflict pull requests with merge conflict label Oct 21, 2022
@sonarcloud
Copy link

sonarcloud bot commented Oct 21, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@khavinshankar khavinshankar merged commit 39a7f73 into coronasafe:develop Oct 21, 2022
khavinshankar added a commit that referenced this pull request Oct 22, 2022
* Create main.yml

* Fix main.yml errors

* Update main.yml

* Update and rename main.yml to merge_upstream.yml

* Update merge_upstream.yml

* Update merge_upstream.yml

* Refactor cypress workflow

- Change to ubuntu-latest
- Switch to npm from yarn
- Give appropriate names for each step in workflow

* Fix patient crud error on Add Patient button

* Remove accidentally added workflow

* Delete stale.yml (#3782)

* feat: added github stale action (#3785)

* Made the teleicuvitalcard responsive (#3669)

* Made TeleViatlsCard responsive

* Minor enhancement

* fix buggy redirect after clicking on cancel button in add more bed types (#3710)

* fix buggy redirect after clicking on cancel button in add more bed types

* fix: deepscan issues

* Update packages and remove obsolete dependencies (#3748)

* Remove nonessential packages

* Update packages having a minor version change

* Add back autoprefixer

* Fix for google maps

* Change error message for offline camera (#3789)

* Minor UI enhacement in Patients page for extreme small devices and some ranges (#3779)

* Use `Inter` font as the sans font (#3683)

* Adds `Inter` as sans font

* fix overweighted font usages

* correct font weights

* correct font weights

* Fix login page title overflow

* Adds fallback to `sans-serif`

Co-authored-by: Bodhish Thomas <bodhish@gmail.com>

* Update src/style/index.css

Co-authored-by: Bodhish Thomas <bodhish@gmail.com>

* fix syntax

* fix typo

Co-authored-by: Bodhish Thomas <bodhish@gmail.com>

* Patient Category Colors (#3728)

* patient category type

* show category in patient list page

* move colors to tailwind config for app wide access

* category on info card

* fix issue with classes skipped from build

* category on patient profile

* patient info card, move category above patient photo

* Revert "patient info card, move category above patient photo"

This reverts commit 9dc5d55.

* Patient Review feature fixes (#3584)

* Add review_interval and review badges

* Change label to Review before

* Update src/Components/Patient/DailyRounds.tsx

Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>

* Upgrade cypress to v10.10.0

* Fix Error in facility create with adding doctor

* Fix `parseInt` parameter error in patient crud

* Add emojis

Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>
Co-authored-by: ARYAN PATEL <patelaryan7751@gmail.com>
Co-authored-by: Pragati Bhattad <55177805+Pragati1610@users.noreply.github.com>
Co-authored-by: Ashesh <3626859+Ashesh3@users.noreply.github.com>
Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>
Co-authored-by: Bodhish Thomas <bodhish@gmail.com>
rithviknishad pushed a commit to rithviknishad/care_fe that referenced this pull request Oct 22, 2022
* Add review_interval and review badges

* Change label to Review before

* Update src/Components/Patient/DailyRounds.tsx

Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>
rithviknishad added a commit to rithviknishad/care_fe that referenced this pull request Oct 22, 2022
* Create main.yml

* Fix main.yml errors

* Update main.yml

* Update and rename main.yml to merge_upstream.yml

* Update merge_upstream.yml

* Update merge_upstream.yml

* Refactor cypress workflow

- Change to ubuntu-latest
- Switch to npm from yarn
- Give appropriate names for each step in workflow

* Fix patient crud error on Add Patient button

* Remove accidentally added workflow

* Delete stale.yml (coronasafe#3782)

* feat: added github stale action (coronasafe#3785)

* Made the teleicuvitalcard responsive (coronasafe#3669)

* Made TeleViatlsCard responsive

* Minor enhancement

* fix buggy redirect after clicking on cancel button in add more bed types (coronasafe#3710)

* fix buggy redirect after clicking on cancel button in add more bed types

* fix: deepscan issues

* Update packages and remove obsolete dependencies (coronasafe#3748)

* Remove nonessential packages

* Update packages having a minor version change

* Add back autoprefixer

* Fix for google maps

* Change error message for offline camera (coronasafe#3789)

* Minor UI enhacement in Patients page for extreme small devices and some ranges (coronasafe#3779)

* Use `Inter` font as the sans font (coronasafe#3683)

* Adds `Inter` as sans font

* fix overweighted font usages

* correct font weights

* correct font weights

* Fix login page title overflow

* Adds fallback to `sans-serif`

Co-authored-by: Bodhish Thomas <bodhish@gmail.com>

* Update src/style/index.css

Co-authored-by: Bodhish Thomas <bodhish@gmail.com>

* fix syntax

* fix typo

Co-authored-by: Bodhish Thomas <bodhish@gmail.com>

* Patient Category Colors (coronasafe#3728)

* patient category type

* show category in patient list page

* move colors to tailwind config for app wide access

* category on info card

* fix issue with classes skipped from build

* category on patient profile

* patient info card, move category above patient photo

* Revert "patient info card, move category above patient photo"

This reverts commit 9dc5d55.

* Patient Review feature fixes (coronasafe#3584)

* Add review_interval and review badges

* Change label to Review before

* Update src/Components/Patient/DailyRounds.tsx

Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>

* Upgrade cypress to v10.10.0

* Fix Error in facility create with adding doctor

* Fix `parseInt` parameter error in patient crud

* Add emojis

Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>
Co-authored-by: ARYAN PATEL <patelaryan7751@gmail.com>
Co-authored-by: Pragati Bhattad <55177805+Pragati1610@users.noreply.github.com>
Co-authored-by: Ashesh <3626859+Ashesh3@users.noreply.github.com>
Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>
Co-authored-by: Bodhish Thomas <bodhish@gmail.com>
khavinshankar added a commit that referenced this pull request Oct 26, 2022
* tailwind colors as per figma

* implement select menu with new interface

* use select menu v2 for ordering

* update tailwind colors as per figma

* facility types

* support option value

* gender

* gender icons

* is antenatal field

* kasp

* category

* disease status

* vaccinated

* declared

* telemedicine

* top buttons

* persistent filter buttons

* update color pallete as per figma

* import form fields from consultation redesign PR

* consume new text input

* remove range

* fix

* `npx init storybook`

* update `@storybook/preset-create-react-app`

* install storybook postcss for tailwind

* fix issues with tailwind and reload

* fix magically value prop gone missing

* `npm install tw-elements`

* Rename new to `SelectMenuV2`

* add tw-elements to package lock file

* implements multi select menu

* last admitted to bed type

* remove unused code

* imporve select menus

* update placeholder colors

* show chips below multi select

* consistent `form-input`, `form-textarea` styling

* wip, to let khavin try

* Revert "add tw-elements to package lock file"

This reverts commit eba6368.

* revert `tw-elements` for datepicker

* add `serve-storybook`

* fix colors as per figma color scheme

* implements basic buttons

* update button styles

* button shape circle as boolean attribute

* update filter buttons

* fix button styling when `circle`

* remove comments

* feat: added custom AutoCompleteAsync component

* Merge `package-lock.json` of `develop` to tailwind/storybook

* `npm install --legacy-peer-deps` post merge `develop` to tailwind/storybook

* storybook: remove default stories

* eslint: ignore '*.stories.mdx' files

* storybook: add-on `storybook-dark-mode`

* button stories

* add DateInputV2 and DateRangeInputV2

* make datepicker css consistent

* fix (AutoCompleteAsync): fixed debounce issue

* ui (AsyncAutoComplete): changed bg color

* refactor out `DropdownMenuTransition` for consistent experience across all dropdown components

* add validators

* fix validator issue

* update field validators

* DateFormField and DateRangeFormField wrappers

* use consistent transition for date picker as used in other components

* fix typo

* fix datepicker focus issue, by wrapping it with Popover

* replace material icons with font awesom

* fix asyncautocomplete field placeholder color

* storybook: fontawesome and inter font scripts

* storybook: DateFormField

* storybook: text area and text form fields

* fix styling issue with phone input

* rename `ButtonStyle` to `ButtonVariant`

* storybook: complete button story

* fix property error missing issue

* storybook: `SelectMenuV2`

* storybook: `MultiSelectMenuV2`

* storybook: move care ui elements to care ui dir

* fix title

* select year in datepicker

* disable increment year btn

* Patient Review feature fixes (#3584)

* Add review_interval and review badges

* Change label to Review before

* Update src/Components/Patient/DailyRounds.tsx

Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>

* Keep loading spinner during redirect (#3754)

* Cypress: Fixes & Refactoring (#3798)

* Create main.yml

* Fix main.yml errors

* Update main.yml

* Update and rename main.yml to merge_upstream.yml

* Update merge_upstream.yml

* Update merge_upstream.yml

* Refactor cypress workflow

- Change to ubuntu-latest
- Switch to npm from yarn
- Give appropriate names for each step in workflow

* Fix patient crud error on Add Patient button

* Remove accidentally added workflow

* Delete stale.yml (#3782)

* feat: added github stale action (#3785)

* Made the teleicuvitalcard responsive (#3669)

* Made TeleViatlsCard responsive

* Minor enhancement

* fix buggy redirect after clicking on cancel button in add more bed types (#3710)

* fix buggy redirect after clicking on cancel button in add more bed types

* fix: deepscan issues

* Update packages and remove obsolete dependencies (#3748)

* Remove nonessential packages

* Update packages having a minor version change

* Add back autoprefixer

* Fix for google maps

* Change error message for offline camera (#3789)

* Minor UI enhacement in Patients page for extreme small devices and some ranges (#3779)

* Use `Inter` font as the sans font (#3683)

* Adds `Inter` as sans font

* fix overweighted font usages

* correct font weights

* correct font weights

* Fix login page title overflow

* Adds fallback to `sans-serif`

Co-authored-by: Bodhish Thomas <bodhish@gmail.com>

* Update src/style/index.css

Co-authored-by: Bodhish Thomas <bodhish@gmail.com>

* fix syntax

* fix typo

Co-authored-by: Bodhish Thomas <bodhish@gmail.com>

* Patient Category Colors (#3728)

* patient category type

* show category in patient list page

* move colors to tailwind config for app wide access

* category on info card

* fix issue with classes skipped from build

* category on patient profile

* patient info card, move category above patient photo

* Revert "patient info card, move category above patient photo"

This reverts commit 9dc5d55.

* Patient Review feature fixes (#3584)

* Add review_interval and review badges

* Change label to Review before

* Update src/Components/Patient/DailyRounds.tsx

Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>

* Upgrade cypress to v10.10.0

* Fix Error in facility create with adding doctor

* Fix `parseInt` parameter error in patient crud

* Add emojis

Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>
Co-authored-by: ARYAN PATEL <patelaryan7751@gmail.com>
Co-authored-by: Pragati Bhattad <55177805+Pragati1610@users.noreply.github.com>
Co-authored-by: Ashesh <3626859+Ashesh3@users.noreply.github.com>
Co-authored-by: Rithvik Nishad <rithvikn2001@gmail.com>
Co-authored-by: Bodhish Thomas <bodhish@gmail.com>

* `AutoCompleteAsync` fix `multiple` overload type

* fix (AutoCompleteAsync): fixed input issue

Co-authored-by: Ashesh3 <3626859+Ashesh3@users.noreply.github.com>
Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>
Co-authored-by: Ritesh-Aggarwal <riteshaggarwal2001@gmail.com>
Co-authored-by: Mohammed Rabil <63334479+rabilrbl@users.noreply.github.com>
Co-authored-by: ARYAN PATEL <patelaryan7751@gmail.com>
Co-authored-by: Pragati Bhattad <55177805+Pragati1610@users.noreply.github.com>
Co-authored-by: Bodhish Thomas <bodhish@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review time: consultation update
6 participants