From 0b88b3d5e517927df0721ce652d7b3dd90009ebc Mon Sep 17 00:00:00 2001 From: Andreas Weyer Date: Wed, 3 Dec 2025 21:48:47 +0000 Subject: [PATCH] Remove unused files --- src/components/deviation-list.tsx | 119 ---------------------------- src/components/dose-schedule.tsx | 48 ----------- src/components/suggestion-panel.tsx | 44 ---------- src/utils/suggestions.ts | 38 --------- 4 files changed, 249 deletions(-) delete mode 100644 src/components/deviation-list.tsx delete mode 100644 src/components/dose-schedule.tsx delete mode 100644 src/components/suggestion-panel.tsx delete mode 100644 src/utils/suggestions.ts diff --git a/src/components/deviation-list.tsx b/src/components/deviation-list.tsx deleted file mode 100644 index e5636a0..0000000 --- a/src/components/deviation-list.tsx +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Deviation List Component - * - * Tracks and manages deviations from the planned medication schedule. - * Supports adding, editing, and deleting deviations with automatic or - * manual timestamps. Each deviation can be marked as planned or actual. - * - * @author Andreas Weyer - * @license MIT - */ - -import React from 'react'; -import { FormTimeInput } from './ui/form-time-input'; -import { FormNumericInput } from './ui/form-numeric-input'; -import { Card, CardContent, CardHeader, CardTitle } from './ui/card'; -import { Button } from './ui/button'; -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './ui/select'; -import { Switch } from './ui/switch'; -import { Label } from './ui/label'; -import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './ui/tooltip'; -import { X } from 'lucide-react'; - -const DeviationList = ({ - deviations, - doseIncrement, - simulationDays, - onAddDeviation, - onRemoveDeviation, - onDeviationChange, - t -}: any) => { - return ( - - - {t.deviationsFromPlan} - - - {deviations.map((dev: any, index: number) => ( -
-
- - - onDeviationChange(index, 'time', newTime)} - required={true} - errorMessage={t.timeRequired || 'Time is required'} - /> - - onDeviationChange(index, 'dose', newDose)} - increment={doseIncrement} - min={0} - unit={t.mg} - required={true} - errorMessage={t.doseRequired || 'Dose is required'} - /> - - - - -
- onDeviationChange(index, 'isAdditional', checked)} - /> - -
-
- -

{t.additionalTooltip}

-
-
-
-
- - -
- ))} - - -
-
- ); -}; - -export default DeviationList; diff --git a/src/components/dose-schedule.tsx b/src/components/dose-schedule.tsx deleted file mode 100644 index d0869b2..0000000 --- a/src/components/dose-schedule.tsx +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Dose Schedule Component - * - * Manages up to 5 daily dose time slots with time and dose amount inputs. - * Provides validation and allows empty entries for flexible scheduling. - * - * @author Andreas Weyer - * @license MIT - */ - -import React from 'react'; -import { FormTimeInput } from './ui/form-time-input'; -import { FormNumericInput } from './ui/form-numeric-input'; -import { Card, CardContent, CardHeader, CardTitle } from './ui/card'; - -const DoseSchedule = ({ doses, doseIncrement, onUpdateDoses, t }: any) => { - return ( - - - {t.myPlan} - - - {doses.map((dose: any, index: number) => ( -
- onUpdateDoses(doses.map((d: any, i: number) => i === index ? {...d, time: newTime} : d))} - required={true} - errorMessage={t.timeRequired || 'Time is required'} - /> - onUpdateDoses(doses.map((d: any, i: number) => i === index ? {...d, dose: newDose} : d))} - increment={doseIncrement} - min={0} - unit={t.mg} - required={true} - errorMessage={t.doseRequired || 'Dose is required'} - /> - {t[dose.label] || dose.label} -
- ))} -
-
- ); -}; - -export default DoseSchedule; diff --git a/src/components/suggestion-panel.tsx b/src/components/suggestion-panel.tsx deleted file mode 100644 index 868382a..0000000 --- a/src/components/suggestion-panel.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Suggestion Panel Component - * - * Displays dose correction suggestions based on deviations from the plan. - * Shows recommended time and dose adjustments with apply button. - * - * @author Andreas Weyer - * @license MIT - */ - -import React from 'react'; -import { Card, CardContent, CardHeader, CardTitle } from './ui/card'; -import { Button } from './ui/button'; - -const SuggestionPanel = ({ suggestion, onApplySuggestion, t }: any) => { - if (!suggestion) return null; - - return ( - - - {t.whatIf} - - - {suggestion.dose ? ( -
-

- {t.suggestion}: {suggestion.dose}{t.mg} ({t.instead} {suggestion.originalDose}{t.mg}) {t.at} {suggestion.time}. -

- -
- ) : ( -

{suggestion.text}

- )} -
-
- ); -}; - -export default SuggestionPanel; diff --git a/src/utils/suggestions.ts b/src/utils/suggestions.ts deleted file mode 100644 index 4ce5c08..0000000 --- a/src/utils/suggestions.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Dose Correction Suggestion Engine - * - * Generates dose correction suggestions when deviations occur from the planned - * medication schedule. Calculates required dose adjustments and optimal timing - * to maintain therapeutic concentrations. - * - * @author Andreas Weyer - * @license MIT - */ - -import { timeToMinutes } from './timeUtils'; -import { calculateCombinedProfile } from './calculations'; -import type { DayGroup, SteadyStateConfig, PkParams } from '../constants/defaults'; - -interface SuggestionResult { - text?: string; - time?: string; - dose?: string; - isAdditional?: boolean; - originalDose?: string; - dayOffset?: number; -} - -interface Translations { - noSuitableNextDose: string; - noSignificantCorrection: string; -} - -export const generateSuggestion = ( - days: DayGroup[], - steadyStateConfig: SteadyStateConfig, - pkParams: PkParams -): SuggestionResult | null => { - // Suggestion feature is deprecated in day-based system - // This function is kept for backward compatibility but returns null - return null; -};