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

Refactor discharge_reason data type to Integer #6807

Merged
merged 11 commits into from
Jan 11, 2024

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Dec 7, 2023

Backend PR: ohcnetwork/care#1773

WHAT

🤖[deprecated] Generated by Copilot at 5693149

The pull request refactors and updates the code related to discharge reasons in various components and interfaces. It uses a constant DISCHARGE_REASONS for the discharge reasons and changes the type of the discharge_reason property to a number or null to align with the backend API. This improves the code consistency, clarity, and maintainability.

Proposed Changes

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

HOW

🤖[deprecated] Generated by Copilot at 5693149

  • Change the type of discharge_reason from string to number or null in various interfaces, components, and states to match the backend API and avoid type errors (link, link, link, link, link, link, link)
  • Replace hard-coded strings with the DISCHARGE_REASONS constant from src/Common/constants.tsx in various components to improve readability and maintainability and avoid errors due to typos or changes in the discharge reasons (link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Change the label, value, name, and error of the TextFormField and TextAreaFormField components in the DischargeModal component based on the discharge_reason value using numbers and an object literal to access the corresponding text (link, link, link, link, link, link)

@Ashesh3 Ashesh3 requested a review from a team as a code owner December 7, 2023 09:34
Copy link

vercel bot commented Dec 7, 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 Jan 10, 2024 7:36am

Copy link

netlify bot commented Dec 7, 2023

Deploy Preview for care-egov-staging ready!

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

Copy link

cypress bot commented Dec 7, 2023

Passing run #1854 ↗︎

0 96 0 0 Flakiness 0

Details:

Refactor discharge_reason data type to Integer
Project: CARE Commit: e00cbe4015
Status: Passed Duration: 02:11 💡
Started: Jan 10, 2024 7:38 AM Ended: Jan 10, 2024 7:41 AM

Review all test suite changes for PR #6807 ↗︎

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.

@nihal467
Copy link
Member

@Ashesh3 clear the merge conflict and follow up on the backend PR

@Ashesh3 Ashesh3 removed changes required merge conflict pull requests with merge conflict labels Dec 27, 2023
@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Dec 28, 2023
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.

@nihal467
Copy link
Member

test to complete

  • all four type discharge is possible in patient consultation / shifting form / patient transfer
  • discharge reason is properly chosen in patient consultation page
  • discharge reason is properly chosen in discharge summary

@nihal467
Copy link
Member

@Ashesh3
image

  • patient discharge reason with recovered, referred, LAMA is not possible

@Ashesh3
Copy link
Member Author

Ashesh3 commented Jan 10, 2024

Note: Discharge reason filter on Patient List page is non functional - Pending merge of ohcnetwork/care#1818

@nihal467 nihal467 added P1 breaking issue or vital feature waiting for backend labels Jan 10, 2024
@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit f62ea5d into develop Jan 11, 2024
37 of 38 checks passed
@khavinshankar khavinshankar deleted the discharge-reason-integer branch January 11, 2024 14:03
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.

Convert discharge_reason to IntegerField
3 participants