feat(health-risk): add printable assessment report

This commit is contained in:
2026-07-30 11:52:43 +08:00
parent 5894ee277a
commit 82e75c03d0
8 changed files with 1189 additions and 6 deletions
@@ -8,6 +8,8 @@ interface HealthRiskContextType {
setPredictionResults: Dispatch<SetStateAction<PredictionResult[]>>;
currentYear: number;
setCurrentYear: Dispatch<SetStateAction<number>>;
analysisQueryTime: string | null;
setAnalysisQueryTime: Dispatch<SetStateAction<string | null>>;
}
const HealthRiskContext = createContext<HealthRiskContextType | undefined>(undefined);
@@ -15,6 +17,7 @@ const HealthRiskContext = createContext<HealthRiskContextType | undefined>(undef
export const HealthRiskProvider: React.FC<{ children: ReactNode }> = ({ children }) => {
const [predictionResults, setPredictionResults] = useState<PredictionResult[]>([]);
const [currentYear, setCurrentYear] = useState<number>(4);
const [analysisQueryTime, setAnalysisQueryTime] = useState<string | null>(null);
return (
<HealthRiskContext.Provider
@@ -23,6 +26,8 @@ export const HealthRiskProvider: React.FC<{ children: ReactNode }> = ({ children
setPredictionResults,
currentYear,
setCurrentYear,
analysisQueryTime,
setAnalysisQueryTime,
}}
>
{children}