Skip to content

Commit

Permalink
ai discharge summary
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 committed Oct 5, 2023
1 parent 64c0b24 commit b8d845c
Show file tree
Hide file tree
Showing 5 changed files with 602 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/Components/Common/components/AccordionV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useRef, useState } from "react";
import { classNames } from "../../../Utils/utils";

export default function AccordionV2(props: {
prefix?: JSX.Element | JSX.Element[];
children: JSX.Element | JSX.Element[];
expandIcon?: JSX.Element;
title: JSX.Element | JSX.Element[] | string;
Expand All @@ -14,6 +15,7 @@ export default function AccordionV2(props: {
return (
<div className={props.className}>
<div className="flex justify-between">
<>{props.prefix}</>
<button
type="button"
className="grid w-full justify-start"
Expand Down
13 changes: 13 additions & 0 deletions src/Components/Facility/ConsultationDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { ConsultationVentilatorTab } from "./ConsultationVentilatorTab";
import { ConsultationPressureSoreTab } from "./ConsultationPressureSoreTab";
import { ConsultationDialysisTab } from "./ConsultationDialysisTab";
import { ConsultationNeurologicalMonitoringTab } from "./ConsultationNeurologicalMonitoringTab";
import DischargeAISummaryModal from "../DischargeAISummaryModal";

const Loading = lazy(() => import("../../Common/Loading"));
const PageTitle = lazy(() => import("../../Common/PageTitle"));
Expand Down Expand Up @@ -86,6 +87,8 @@ export const ConsultationDetails = (props: any) => {
const [activeShiftingData, setActiveShiftingData] = useState<Array<any>>([]);
const [openDischargeSummaryDialog, setOpenDischargeSummaryDialog] =
useState(false);
const [openAIDischargeSummaryDialog, setOpenAIDischargeSummaryDialog] =
useState(false);
const [openDischargeDialog, setOpenDischargeDialog] = useState(false);

const getPatientGender = (patientData: any) =>
Expand Down Expand Up @@ -263,6 +266,12 @@ export const ConsultationDetails = (props: any) => {
onClose={() => setOpenDischargeSummaryDialog(false)}
/>

<DischargeAISummaryModal
consultation={consultationData}
show={openAIDischargeSummaryDialog}
onClose={() => setOpenAIDischargeSummaryDialog(false)}
/>

<DischargeModal
show={openDischargeDialog}
onClose={() => setOpenDischargeDialog(false)}
Expand Down Expand Up @@ -443,6 +452,10 @@ export const ConsultationDetails = (props: any) => {
)}
</div>
<div className="flex h-full w-full flex-col justify-end gap-2 text-right lg:flex-row">
<ButtonV2 onClick={() => setOpenAIDischargeSummaryDialog(true)}>
<i className="fas fa-robot"></i>
<span>AI {t("discharge_summary")}</span>
</ButtonV2>
<ButtonV2 onClick={() => setOpenDischargeSummaryDialog(true)}>
<i className="fas fa-clipboard-list"></i>
<span>{t("discharge_summary")}</span>
Expand Down
Loading

0 comments on commit b8d845c

Please sign in to comment.