-
Notifications
You must be signed in to change notification settings - Fork 437
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
Ventilator mode/oxygen modality data on consultation page #8781
Merged
Jacobjeevan
merged 24 commits into
ohcnetwork:develop
from
Jacobjeevan:issues/8264-VentilatorData-ConsultationPage
Nov 10, 2024
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
172e891
Ventilator Data
Jacobjeevan 87ef849
MarkerLine and MarkerArea
Jacobjeevan 2da3738
MarkLine, rm MarkArea code
Jacobjeevan 21ef525
Merge branch 'develop' into issues/8264-VentilatorData-ConsultationPage
Jacobjeevan 3ecf02c
Rm markArea import
Jacobjeevan e0c0c73
added overflow to table/mobile view
Jacobjeevan b21a3ed
Merge branch 'develop' into issues/8264-VentilatorData-ConsultationPage
Jacobjeevan 292cbd2
render most recent mode/modality on graph
Jacobjeevan 6020479
Merge branch 'develop' into issues/8264-VentilatorData-ConsultationPage
Jacobjeevan 43d0b6a
log fixes
Jacobjeevan 5703f3f
Merge branch 'develop' into issues/8264-VentilatorData-ConsultationPage
Jacobjeevan d36c1c4
IV/NIV log text modification
Jacobjeevan 2f73b9d
Fixes and cleanup
Jacobjeevan c816a13
Merge branch 'develop' into issues/8264-VentilatorData-ConsultationPage
Jacobjeevan e63d220
Cleanup
Jacobjeevan c5021d6
Merge branch 'develop' into issues/8264-VentilatorData-ConsultationPage
Jacobjeevan d39fd1e
Pagination Limit
Jacobjeevan c4faca1
using date utils
Jacobjeevan fd6b6aa
Merge branch 'develop' into issues/8264-VentilatorData-ConsultationPage
Jacobjeevan 9abc403
improvement suggestions
Jacobjeevan dd4abbb
Nitpick fixes
Jacobjeevan 98055fb
type fix
Jacobjeevan b900412
Merge branch 'develop' into issues/8264-VentilatorData-ConsultationPage
Jacobjeevan c5c354d
lint fix
Jacobjeevan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 29 additions & 5 deletions
34
src/components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,44 @@ | ||
import Loading from "@/components/Common/Loading"; | ||
import PageTitle from "@/components/Common/PageTitle"; | ||
import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; | ||
import { VentilatorPlot } from "@/components/Facility/Consultations/VentilatorPlot"; | ||
import VentilatorTable from "@/components/Facility/Consultations/VentilatorTable"; | ||
|
||
import useFilters from "@/hooks/useFilters"; | ||
|
||
import routes from "@/Utils/request/api"; | ||
import useQuery from "@/Utils/request/useQuery"; | ||
|
||
export const ConsultationVentilatorTab = (props: ConsultationTabProps) => { | ||
const { consultationId } = props; | ||
const { qParams, Pagination, resultsPerPage } = useFilters({ limit: 36 }); | ||
|
||
const { loading: isLoading, data } = useQuery(routes.getDailyReports, { | ||
pathParams: { consultationId }, | ||
query: { | ||
limit: resultsPerPage, | ||
offset: (qParams.page ? qParams.page - 1 : 0) * resultsPerPage, | ||
}, | ||
}); | ||
Jacobjeevan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
if (isLoading) { | ||
return <Loading />; | ||
} | ||
|
||
return ( | ||
<div> | ||
<PageTitle | ||
title="Respiratory Support" | ||
hideBack={true} | ||
breadcrumbs={false} | ||
/> | ||
<VentilatorPlot | ||
facilityId={props.facilityId} | ||
patientId={props.patientId} | ||
consultationId={props.consultationId} | ||
/> | ||
<VentilatorTable dailyRoundsList={data?.results} /> | ||
<VentilatorPlot dailyRoundsList={data?.results} /> | ||
{Boolean(data?.count && data.count > 0) && ( | ||
<div className="mt-4 flex w-full justify-center"> | ||
<Pagination totalCount={data?.count ?? 0} /> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Consider standardizing the pagination limit
The codebase shows inconsistent pagination limits across different components:
This inconsistency suggests there's no standardized pagination limit across the application. The current implementation with 36 items significantly deviates from other components that use smaller limits (12-16 items), which could impact performance and user experience.
🔗 Analysis chain
Verify the pagination limit of 36 items.
The limit of 36 items per page seems arbitrary. Please confirm if this number was chosen based on specific requirements or if it should align with other pagination implementations in the application.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 415
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's 36 daily log events and not every event would have a corresponding ventilator table entry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jacobjeevan, understood. Thank you for the clarification. I've noted this for future reviews.
(_/)
(•_•)
/ ?
✏️ Learnings added