-
Notifications
You must be signed in to change notification settings - Fork 514
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
Enhance encounter data handling by adding encounterId prop across all equests #9793
Conversation
…tiple components - Added `encounterId` prop to `ObservationChart`, `ObservationHistoryTable`, `ObservationsList`, `QuestionnaireResponsesList`, and `StructuredResponseView` components to improve data fetching and display related to specific encounters. - Updated query parameters in API calls to include `encounterId` for better data context. - Refactored `EncounterPlotsTab` and `EncounterUpdatesTab` to pass the new `encounterId` prop, ensuring consistent data handling across the application. This change improves the overall functionality and user experience by ensuring that encounter-specific data is accurately retrieved and displayed.
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces the Changes
Sequence DiagramsequenceDiagram
participant Parent as Parent Component
participant ObservationVisualizer as ObservationVisualizer
participant ObservationHistoryTable as ObservationHistoryTable
participant API as Backend API
Parent Component->>ObservationVisualizer: Pass encounterId
ObservationVisualizer->>API: Fetch observations with encounterId
API-->>ObservationVisualizer: Return observations
ObservationVisualizer->>ObservationHistoryTable: Pass encounterId
ObservationHistoryTable->>API: Fetch observation history with encounterId
API-->>ObservationHistoryTable: Return observation history
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (7)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@bodhish Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌 |
…tiple components (#9793)
This pull request introduces several changes to enhance the handling of
encounterId
across multiple components, ensuring that observation data is correctly queried and displayed based on the encounter context. The most important changes include updates to theObservationVisualizer
,ObservationHistoryTable
,ObservationsList
,QuestionnaireResponsesList
, andStructuredResponseView
components.Enhancements to Encounter Context Handling:
src/components/Common/Charts/ObservationChart.tsx
: AddedencounterId
to theObservationVisualizerProps
interface and modified theObservationVisualizer
component to includeencounterId
in the query parameters for fetching observations. [1] [2] [3] [4]src/components/Common/Charts/ObservationHistoryTable.tsx
: Updated theObservationHistoryTable
component to accept and utilizeencounterId
in its query parameters for fetching observation history. [1] [2] [3]Infinite Scrolling and Query Optimization:
src/components/Facility/ConsultationDetails/ObservationsList.tsx
: Implemented infinite scrolling for theObservationsList
component usinguseInfiniteQuery
anduseInView
, replacing the previous paginated list implementation. This change optimizes the loading of observations by encounter. [1] [2] [3]Consistent Encounter Query Parameters:
src/components/Facility/ConsultationDetails/QuestionnaireResponsesList.tsx
: Ensured thatencounterId
is consistently used in query parameters for fetching questionnaire responses. [1] [2]src/components/Facility/ConsultationDetails/StructuredResponseView.tsx
: AddedencounterId
to theStructuredResponseView
component's props and included it in the query parameters for fetching structured response data. [1] [2]Additional Changes:
src/pages/Encounters/tabs/EncounterPlotsTab.tsx
: Updated theEncounterPlotsTab
component to passencounterId
to theObservationVisualizer
.Proposed Changes
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
New Features
Improvements
Technical Updates
encounterId
prop across multiple components