forked from ohcnetwork/care_fe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Consultation Details (ohcnetwork#6258)
- Loading branch information
Showing
15 changed files
with
1,443 additions
and
1,324 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
src/Components/Facility/ConsultationDetails/ConsultationABGTab.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { lazy } from "react"; | ||
import { ConsultationTabProps } from "./index"; | ||
import { ABGPlots } from "../Consultations/ABGPlots"; | ||
|
||
const PageTitle = lazy(() => import("../../Common/PageTitle")); | ||
|
||
export const ConsultationABGTab = (props: ConsultationTabProps) => { | ||
return ( | ||
<div> | ||
<PageTitle | ||
title="ABG Analysis Plot" | ||
hideBack={true} | ||
breadcrumbs={false} | ||
/> | ||
<ABGPlots | ||
facilityId={props.facilityId} | ||
patientId={props.patientId} | ||
consultationId={props.consultationId} | ||
></ABGPlots> | ||
</div> | ||
); | ||
}; |
14 changes: 14 additions & 0 deletions
14
src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { lazy } from "react"; | ||
import { ConsultationTabProps } from "./index"; | ||
import { DialysisPlots } from "../Consultations/DialysisPlots"; | ||
|
||
const PageTitle = lazy(() => import("../../Common/PageTitle")); | ||
|
||
export const ConsultationDialysisTab = (props: ConsultationTabProps) => { | ||
return ( | ||
<div> | ||
<PageTitle title="Dialysis Plots" hideBack={true} breadcrumbs={false} /> | ||
<DialysisPlots consultationId={props.consultationId}></DialysisPlots> | ||
</div> | ||
); | ||
}; |
22 changes: 22 additions & 0 deletions
22
src/Components/Facility/ConsultationDetails/ConsultationFeedTab.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { lazy } from "react"; | ||
import { Feed } from "../Consultations/Feed"; | ||
import { ConsultationTabProps } from "./index"; | ||
|
||
const PageTitle = lazy(() => import("../../Common/PageTitle")); | ||
|
||
export const ConsultationFeedTab = (props: ConsultationTabProps) => { | ||
return ( | ||
<div> | ||
<PageTitle | ||
title="Camera Feed" | ||
breadcrumbs={false} | ||
hideBack={true} | ||
focusOnLoad={true} | ||
/> | ||
<Feed | ||
facilityId={props.facilityId} | ||
consultationId={props.consultationId} | ||
/> | ||
</div> | ||
); | ||
}; |
18 changes: 18 additions & 0 deletions
18
src/Components/Facility/ConsultationDetails/ConsultationFilesTab.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { ConsultationTabProps } from "./index"; | ||
import { FileUpload } from "../../Patient/FileUpload"; | ||
|
||
export const ConsultationFilesTab = (props: ConsultationTabProps) => { | ||
return ( | ||
<div> | ||
<FileUpload | ||
facilityId={props.facilityId} | ||
patientId={props.patientId} | ||
consultationId={props.consultationId} | ||
type="CONSULTATION" | ||
hideBack={true} | ||
audio={true} | ||
unspecified={true} | ||
/> | ||
</div> | ||
); | ||
}; |
39 changes: 39 additions & 0 deletions
39
src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { lazy } from "react"; | ||
import { ConsultationTabProps } from "./index"; | ||
import { NonReadOnlyUsers } from "../../../Utils/AuthorizeFor"; | ||
import ButtonV2 from "../../Common/components/ButtonV2"; | ||
import { navigate } from "raviger"; | ||
import CareIcon from "../../../CAREUI/icons/CareIcon"; | ||
import InvestigationTab from "../Investigations/investigationsTab"; | ||
import { t } from "i18next"; | ||
|
||
const PageTitle = lazy(() => import("../../Common/PageTitle")); | ||
export const ConsultationInvestigationsTab = (props: ConsultationTabProps) => { | ||
return ( | ||
<div> | ||
<div className="justify-between sm:flex"> | ||
<PageTitle title="Investigations" hideBack={true} breadcrumbs={false} /> | ||
<div className="pt-6"> | ||
<ButtonV2 | ||
authorizeFor={NonReadOnlyUsers} | ||
disabled={!props.patientData.is_active} | ||
onClick={() => | ||
navigate( | ||
`/facility/${props.facilityId}/patient/${props.patientId}/consultation/${props.consultationId}/investigation/` | ||
) | ||
} | ||
> | ||
<CareIcon className="care-l-plus" /> | ||
<span>{t("log_lab_results")}</span> | ||
</ButtonV2> | ||
</div> | ||
</div> | ||
<InvestigationTab | ||
consultationId={props.consultationId} | ||
facilityId={props.facilityId} | ||
patientId={props.patientId} | ||
patientData={props.patientData} | ||
/> | ||
</div> | ||
); | ||
}; |
19 changes: 19 additions & 0 deletions
19
src/Components/Facility/ConsultationDetails/ConsultationMedicinesTab.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ConsultationTabProps } from "./index"; | ||
import PrescriptionAdministrationsTable from "../../Medicine/PrescriptionAdministrationsTable"; | ||
|
||
export const ConsultationMedicinesTab = (props: ConsultationTabProps) => { | ||
return ( | ||
<div className="my-4 flex flex-col gap-16"> | ||
<PrescriptionAdministrationsTable | ||
consultation_id={props.consultationId} | ||
readonly={!!props.consultationData.discharge_date} | ||
prn={false} | ||
/> | ||
<PrescriptionAdministrationsTable | ||
consultation_id={props.consultationId} | ||
prn={true} | ||
readonly={!!props.consultationData.discharge_date} | ||
/> | ||
</div> | ||
); | ||
}; |
24 changes: 24 additions & 0 deletions
24
src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { lazy } from "react"; | ||
import { NeurologicalTable } from "../Consultations/NeurologicalTables"; | ||
import { ConsultationTabProps } from "./index"; | ||
|
||
const PageTitle = lazy(() => import("../../Common/PageTitle")); | ||
|
||
export const ConsultationNeurologicalMonitoringTab = ( | ||
props: ConsultationTabProps | ||
) => { | ||
return ( | ||
<div> | ||
<PageTitle | ||
title="Neurological Monitoring" | ||
hideBack={true} | ||
breadcrumbs={false} | ||
/> | ||
<NeurologicalTable | ||
facilityId={props.facilityId} | ||
patientId={props.patientId} | ||
consultationId={props.consultationId} | ||
></NeurologicalTable> | ||
</div> | ||
); | ||
}; |
18 changes: 18 additions & 0 deletions
18
src/Components/Facility/ConsultationDetails/ConsultationNeutritionTab.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { lazy } from "react"; | ||
import { ConsultationTabProps } from "./index"; | ||
import { NutritionPlots } from "../Consultations/NutritionPlots"; | ||
|
||
const PageTitle = lazy(() => import("../../Common/PageTitle")); | ||
|
||
export const ConsultationNeutritionTab = (props: ConsultationTabProps) => { | ||
return ( | ||
<div> | ||
<PageTitle title="Nutrition" hideBack={true} breadcrumbs={false} /> | ||
<NutritionPlots | ||
facilityId={props.facilityId} | ||
patientId={props.patientId} | ||
consultationId={props.consultationId} | ||
></NutritionPlots> | ||
</div> | ||
); | ||
}; |
18 changes: 18 additions & 0 deletions
18
src/Components/Facility/ConsultationDetails/ConsultationNursingTab.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { lazy } from "react"; | ||
import { ConsultationTabProps } from "./index"; | ||
import { NursingPlot } from "../Consultations/NursingPlot"; | ||
|
||
const PageTitle = lazy(() => import("../../Common/PageTitle")); | ||
|
||
export const ConsultationNursingTab = (props: ConsultationTabProps) => { | ||
return ( | ||
<div> | ||
<PageTitle title="Nursing Analysis" hideBack={true} breadcrumbs={false} /> | ||
<NursingPlot | ||
facilityId={props.facilityId} | ||
patientId={props.patientId} | ||
consultationId={props.consultationId} | ||
></NursingPlot> | ||
</div> | ||
); | ||
}; |
14 changes: 14 additions & 0 deletions
14
src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { lazy } from "react"; | ||
import { ConsultationTabProps } from "./index"; | ||
import { PressureSoreDiagrams } from "../Consultations/PressureSoreDiagrams"; | ||
|
||
const PageTitle = lazy(() => import("../../Common/PageTitle")); | ||
|
||
export const ConsultationPressureSoreTab = (props: ConsultationTabProps) => { | ||
return ( | ||
<div className="mt-4"> | ||
<PageTitle title="Pressure Sore" hideBack={true} breadcrumbs={false} /> | ||
<PressureSoreDiagrams consultationId={props.consultationId} /> | ||
</div> | ||
); | ||
}; |
22 changes: 22 additions & 0 deletions
22
src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { lazy } from "react"; | ||
import { ConsultationTabProps } from "./index"; | ||
import { PrimaryParametersPlot } from "../Consultations/PrimaryParametersPlot"; | ||
|
||
const PageTitle = lazy(() => import("../../Common/PageTitle")); | ||
|
||
export const ConsultationSummaryTab = (props: ConsultationTabProps) => { | ||
return ( | ||
<div className="mt-4"> | ||
<PageTitle | ||
title="Primary Parameters Plot" | ||
hideBack={true} | ||
breadcrumbs={false} | ||
/> | ||
<PrimaryParametersPlot | ||
facilityId={props.facilityId} | ||
patientId={props.patientId} | ||
consultationId={props.consultationId} | ||
></PrimaryParametersPlot> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.