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

fetch assets only when bed is assigned #5769

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Conversation

khavinshankar
Copy link
Member

@khavinshankar khavinshankar commented Jun 23, 2023

WHAT

🤖 Generated by Copilot at 5290cab

This pull request enhances the ConsultationDetails.tsx component by fixing bugs, removing clutter, and adding new functionalities for displaying the patient's bed, discharge, and vitals information.

Proposed Changes

  • Fixes the issue of showing vitals when bed is not assigned

@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

🤖 Generated by Copilot at 5290cab

  • Import types for AssetBedModel and AssetClass from Assets module to fetch and display bed details in consultation details page (link)
  • Remove unused import of useDispatch hook from react-redux library (link)
  • Add imports for DischargeSummaryModal, HL7PatientVitalsMonitor, NonReadOnlyUsers, and VentilatorPatientVitalsMonitor components to render discharge summary modal, HL7 patient vitals monitor, authorization logic for non-read-only users, and ventilator patient vitals monitor respectively in consultation details page (link)
  • Move imports for moment, raviger, react-redux, and react-i18next libraries to the top of the file and remove duplicate imports for NonReadOnlyUsers, PrescriptionsTable, MedicineAdministrationsTable, DischargeSummaryModal, and VentilatorPatientVitalsMonitor components, following the convention of importing external libraries before internal modules and avoiding redundant imports (link)
  • Modify VitalsCard component to set initial loading state to false and add condition to check if consultation has a current bed object with an id before fetching bed details, preventing unnecessary loading and API calls and fixing a bug where bed details would not update when bed is changed (link)

@khavinshankar khavinshankar requested a review from a team June 23, 2023 11:29
@khavinshankar khavinshankar requested a review from a team as a code owner June 23, 2023 11:29
@vercel
Copy link

vercel bot commented Jun 23, 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 Jun 23, 2023 11:29am

@netlify
Copy link

netlify bot commented Jun 23, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 5290cab
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/649582068fd2ad0008c9c087
😎 Deploy Preview https://deploy-preview-5769--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.

@github-actions github-actions bot added the cypress failed pull request with cypress test failure label Jun 23, 2023
@khavinshankar khavinshankar added urgent needs testing P1 breaking issue or vital feature labels Jun 23, 2023
Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

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

Oh damn 😅 How did I miss this

@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit 9c815f5 into develop Jun 23, 2023
@khavinshankar khavinshankar deleted the fix-no-bed-vitals branch June 23, 2023 14:22
@github-actions
Copy link

@khavinshankar 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
cypress failed pull request with cypress test failure P1 breaking issue or vital feature tested urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants