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

Remove default selection of patient category #6354

Merged
merged 3 commits into from
Sep 27, 2023
Merged

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Sep 26, 2023

WHAT

🤖 Generated by Copilot at a336f5f

The pull request makes the category and patient_category fields mandatory in the consultation and daily rounds forms, respectively, to ensure accurate and consistent data entry. It also fixes a bug in the default value of patient_category in the DailyRounds component.

Proposed Changes

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

HOW

🤖 Generated by Copilot at a336f5f

  • Change the default value of the category and patient_category fields from "Comfort" to an empty string in the ConsultationForm and DailyRounds components to avoid pre-selecting a category for the patient and to make it mandatory for the user to choose one (link, link, link, link, link)
  • Add a validation case for the patient_category field in the DailyRounds component to check if it has a value and if not, add an error message and set the invalidForm flag to true (link)
  • Use the optional chaining operator (?.) to check if res.data exists before accessing its properties in the DailyRounds component to prevent errors if res.data is undefined or null (link)

@Ashesh3 Ashesh3 added needs testing P1 breaking issue or vital feature labels Sep 26, 2023
@Ashesh3 Ashesh3 requested a review from a team September 26, 2023 20:06
@Ashesh3 Ashesh3 requested a review from a team as a code owner September 26, 2023 20:06
@netlify
Copy link

netlify bot commented Sep 26, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 582ba11
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/65141639eef56c000800e65d
😎 Deploy Preview https://deploy-preview-6354--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.

@vercel
Copy link

vercel bot commented Sep 26, 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 27, 2023 11:47am

@cypress
Copy link

cypress bot commented Sep 26, 2023

Passing run #1318 ↗︎

0 78 0 0 Flakiness 0

Details:

Remove default selection of patient category
Project: CARE Commit: 582ba11b3b
Status: Passed Duration: 03:04 💡
Started: Sep 27, 2023 11:51 AM Ended: Sep 27, 2023 11:54 AM

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

@nihal467
Copy link
Member

@Ashesh3 fix the cypress

@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit 6319cff into develop Sep 27, 2023
52 of 53 checks passed
@khavinshankar khavinshankar deleted the fix-6346 branch September 27, 2023 14:51
@github-actions
Copy link

@Ashesh3 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 🙌.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs testing P1 breaking issue or vital feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Categorisation of patients
3 participants