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

Add "None" to patient action #5355

Merged
merged 6 commits into from
May 4, 2023
Merged

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Apr 19, 2023

Builds on top of #5348 . That needs to be merged before merging this PR.

Backend PR: ohcnetwork/care#1262

WHAT

🤖 Generated by Copilot at 2b7de19

This pull request improves the daily rounds and consultation forms for patients by adding and displaying more information about their actions and categories. It also refactors and renames some fields and constants for clarity and consistency. The main files affected are DailyRounds.tsx, constants.tsx, and ConsultationForm.tsx.

Proposed Changes

  • Fixes Action in log update is malfunctioning #5342

  • action field should be optional

  • default should be a null

  • pending should be having a reflection in the patient list

  • migrate all existing data having pending action in the system to null

  • TODO: pending should be having a reflection in the patient list (Need to discuss how exactly to show this)

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

HOW

🤖 Generated by Copilot at 2b7de19

  • Add a new option "NONE" to the ICMR_CATEGORY and TELEMEDICINE_ACTIONS constants, which are used to display and select the ICMR category and the action recommended for a patient in the consultation form (link, link)
  • Rename the actions field to action in the initForm constant for the daily rounds form, to match the field name in the consultation form and the backend API (link)
  • Fetch the patient name, facility name, previous review interval, and previous action from the patient details API, and set them to the corresponding state variables in the DailyRounds component, using anonymous async functions inside useEffect hooks (link, link)
  • Pre-populate the action and review interval dropdowns in the daily rounds form with the values from the previous consultation, and update the state variables when the user changes the selection, using the SelectField component and the setter functions (link, link)
  • Send the values from the previous consultation to the backend API when saving the daily rounds form, instead of the values from the form state, by modifying the data object (link)

@Ashesh3 Ashesh3 requested a review from a team April 19, 2023 06:56
@Ashesh3 Ashesh3 requested a review from a team as a code owner April 19, 2023 06:56
@vercel
Copy link

vercel bot commented Apr 19, 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 May 3, 2023 6:19pm

@netlify
Copy link

netlify bot commented Apr 19, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 3880165
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6452a56845a4ab00082820f3
😎 Deploy Preview https://deploy-preview-5355--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.

@nihal467
Copy link
Member

nihal467 commented May 3, 2023

LGTM

@sonarcloud
Copy link

sonarcloud bot commented May 3, 2023

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 1 Code Smell

No Coverage information No Coverage information
1.3% 1.3% Duplication

@khavinshankar khavinshankar merged commit bf54e60 into ohcnetwork:develop May 4, 2023
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.

Action in log update is malfunctioning
4 participants