diff --git a/app/doctor/_components/analysis-fallback.tsx b/app/doctor/_components/analysis-fallback.tsx new file mode 100644 index 0000000..9431ad7 --- /dev/null +++ b/app/doctor/_components/analysis-fallback.tsx @@ -0,0 +1,27 @@ +'use server'; + +import React from 'react'; + +import { Spinner } from '@kit/ui/makerkit/spinner'; +import { Trans } from '@kit/ui/makerkit/trans'; +import { Progress } from '@kit/ui/shadcn/progress'; + +import { withI18n } from '~/lib/i18n/with-i18n'; + +const AnalysisFallback = ({ + progress, + progressTextKey, +}: { + progress: number; + progressTextKey: string; +}) => { + return ( +
{feedback?.value ?? '-'}
{!isReadOnly && ( diff --git a/app/doctor/_components/analysis-view.tsx b/app/doctor/_components/analysis-view.tsx index e1fc8e4..d8ae512 100644 --- a/app/doctor/_components/analysis-view.tsx +++ b/app/doctor/_components/analysis-view.tsx @@ -1,5 +1,7 @@ 'use client'; +import { useMemo, useState } from 'react'; + import { useQueryClient } from '@tanstack/react-query'; import { capitalize } from 'lodash'; @@ -23,20 +25,40 @@ import { bmiFromMetric } from '~/lib/utils'; import AnalysisFeedback from './analysis-feedback'; import DoctorAnalysisWrapper from './doctor-analysis-wrapper'; import DoctorJobSelect from './doctor-job-select'; +import DoctorRecommendedAnalyses from './doctor-recommended-analyses'; export default function AnalysisView({ patient, order, analyses, feedback, + aiDoctorFeedback, + recommendations, + availableAnalyses, + timestamp, }: { patient: Patient; order: Order; analyses: AnalysisResponse[]; feedback?: DoctorFeedback; + aiDoctorFeedback?: string; + recommendations?: string[]; + availableAnalyses?: string[]; + timestamp?: string; }) { const { data: user } = useUser(); const queryClient = useQueryClient(); + const [recommendedAnalyses, setRecommendedAnalyses] = useState{feedback?.value ?? '-'}
+{description}
+