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

Rename "Admission Date" to encounter specific labels #6719

Merged
merged 9 commits into from
Dec 21, 2023

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Nov 27, 2023

WHAT

🤖[deprecated] Generated by Copilot at b4c8de2

The pull request updates the frontend code to use the encounter_date field instead of the admission_date field in the consultation model and form. This is to support different types of encounters and suggestions for the consultation, and to align with the changes in the backend. The pull request also refactors the suggestion field to use a new type and filter out deprecated options. The pull request affects several components that display or use the consultation data, such as ConsultationCard, ConsultationDetails, ConsultationForm, DischargeModal, ShiftDetails, DeathReport, TreatmentSummary, and PatientInfoCard. The pull request also updates the patient list API query parameters and the UI labels to use the encounter date instead of the admission date. The pull request also adds a new type called ConsultationSuggestionValue to the constants.tsx file to restrict the possible values of the suggestion field.

Required Backends

Proposed Changes

@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

🤖[deprecated] Generated by Copilot at b4c8de2

  • Rename admission_date field to encounter_date in consultation model, form, and UI components to reflect the fact that it can also represent the date of domiciliary care, out-patient visit, or encounter for other suggestions (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Add as const to CONSULTATION_SUGGESTION array and define ConsultationSuggestionValue type to restrict the possible values of the suggestion field in consultation model and form (link)
  • Change the type of the suggestion field from string to ConsultationSuggestionValue in consultation model and form (link, link)
  • Filter out the deprecated options from the CONSULTATION_SUGGESTION array when rendering the select field for the suggestion field in consultation form (link)
  • Add a new input field for the encounter_date field in consultation form and make it required for all suggestions (link)
  • Use the ConsultationModel interface defined in the Facility folder to type the consultation data in the Patient and Shifting folders (link, link, link)

@rithviknishad rithviknishad requested a review from a team as a code owner November 27, 2023 08:32
Copy link

vercel bot commented Nov 27, 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 Dec 21, 2023 5:01am

Copy link

netlify bot commented Nov 27, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 4164382
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6583c63cfc4c8f00081b72b7
😎 Deploy Preview https://deploy-preview-6719--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 Nov 27, 2023

Passing run #1744 ↗︎

0 91 0 0 Flakiness 0

Details:

Rename "Admission Date" to encounter specific labels
Project: CARE Commit: 41643820c9
Status: Passed Duration: 02:31 💡
Started: Dec 21, 2023 5:03 AM Ended: Dec 21, 2023 5:05 AM

Review all test suite changes for PR #6719 ↗︎

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Nov 27, 2023
Copy link

👋 Hi, @rithviknishad,
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.

@rithviknishad rithviknishad added Backend and removed waiting for backend merge conflict pull requests with merge conflict labels Nov 28, 2023
@nihal467
Copy link
Member

@rithviknishad can you fix the cypress

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Dec 1, 2023
Copy link

github-actions bot commented Dec 1, 2023

👋 Hi, @rithviknishad,
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.

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label Dec 5, 2023
@nihal467
Copy link
Member

nihal467 commented Dec 6, 2023

@rithviknishad
image

  • the existing data, in admission time is getting replaced with current data and time, once the migration was complete

@khavinshankar khavinshankar merged commit 2a0eec6 into develop Dec 21, 2023
26 of 28 checks passed
@khavinshankar khavinshankar deleted the encounter-date branch December 21, 2023 05:32
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 🙌.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants