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

POC: AI discharge summary #6401

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ NODE_OPTIONS = "--max_old_space_size=4096"

[[redirects]]
from = "/api/*"
to = "https://careapi.ohc.network/api/:splat"
to = "https://care-ai-poc.ohc.network/api/:splat"
status = 200
force = true

Expand Down
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";
import { ConsultationNutritionTab } from "./ConsultationNutritionTab";

const Loading = lazy(() => import("../../Common/Loading"));
Expand Down Expand Up @@ -87,6 +88,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 @@ -264,6 +267,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 @@ -444,6 +453,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
Loading