export type RiskLevel = "LOW" | "MODERATE" | "HIGH" | "EMERGENCY"; export interface RiskFactor { id: string; name: string; description: string; points: number; recommendations: string[]; } export interface RiskThreshold { level: RiskLevel; minPoints: number; maxPoints: number | null; } export interface RiskDetectionResult { riskLevel: RiskLevel; score: number; reasons: string[]; contributingFactors: RiskFactor[]; recommendations: string[]; isRedFlag: boolean; redFlagReasons?: string[]; } export interface PatientDataForRiskAssessment { age?: number; bmi?: number; gravidity?: number; parity?: number; previousCaesareans?: number; previousStillbirths?: number; previousIufd?: boolean; previousPreeclampsia?: boolean; previousEclampsia?: boolean; gestationalHypertension?: boolean; chronicHypertension?: boolean; chronicHypertensionBeforePregnancy?: boolean; diabetesMellitus?: boolean; previousGestationalDiabetes?: boolean; kidneyDisease?: boolean; heartDisease?: boolean; previousPlacentalAbruption?: boolean; previousPlacentaPrevia?: boolean; previousMultiplePregnancy?: boolean; familyHypertension?: boolean; familyPreeclampsia?: boolean; previousPretermBirth?: boolean; previousLowBirthWeight?: boolean; previousPostpartumHemorrhage?: boolean; smokingStatus?: "NEVER" | "CURRENT" | "FORMER"; alcoholUse?: "NEVER" | "OCCASIONAL" | "REGULAR"; substanceUse?: "NEVER" | "CURRENT" | "FORMER"; bloodPressureSystolic?: number; bloodPressureDiastolic?: number; urineProtein?: "NEGATIVE" | "TRACE" | "PLUS_1" | "PLUS_2" | "PLUS_3"; hasConvulsions?: boolean; hasHeavyVaginalBleeding?: boolean; hasLossOfConsciousness?: boolean; hasAbsentFetalMovement?: boolean; }