/** * 健康史推荐选项常量 * 用于前端展示和数据验证 */ export const HEALTH_HISTORY_RECOMMENDATIONS = { allergy: [ 'penicillin', // 青霉素 'sulfonamides', // 磺胺类 'peanuts', // 花生 'seafood', // 海鲜 'pollen', // 花粉 'dustMites', // 尘螨 'alcohol', // 酒精 'mango', // 芒果 ], disease: [ 'hypertension', // 高血压 'diabetes', // 糖尿病 'asthma', // 哮喘 'heartDisease', // 心脏病 'gastritis', // 胃炎 'migraine', // 偏头痛 ], surgery: [ 'appendectomy', // 阑尾切除术 'cesareanSection', // 剖腹产 'tonsillectomy', // 扁桃体切除术 'fractureRepair', // 骨折复位术 'none', // 无 ], familyDisease: [ 'hypertension', // 高血压 'diabetes', // 糖尿病 'cancer', // 癌症 'heartDisease', // 心脏病 'stroke', // 中风 'alzheimers', // 阿尔茨海默病 ], }; /** * 健康异常检测规则 */ export interface HealthAbnormalityRule { indicatorName: string; condition: 'gt' | 'lt' | 'eq' | 'range'; threshold: number | [number, number]; severity: 'info' | 'warning' | 'critical'; message: string; } export const ABNORMALITY_RULES: HealthAbnormalityRule[] = [ { indicatorName: '收缩压', condition: 'gt', threshold: 140, severity: 'warning', message: '血压偏高,建议关注', }, { indicatorName: '舒张压', condition: 'gt', threshold: 90, severity: 'warning', message: '舒张压偏高,建议关注', }, { indicatorName: '血糖', condition: 'gt', threshold: 7.0, severity: 'warning', message: '血糖偏高,建议复查', }, { indicatorName: '总胆固醇', condition: 'gt', threshold: 5.2, severity: 'info', message: '胆固醇偏高,建议注意饮食', }, ];