Bläddra i källkod

feat(kb): P0 新增补充剂库/临床指标参考库/运动处方库 + JSON Schema 校验

- 补充剂库 supplements.json:17 条(乐力畅50/力蜚能铁/和安氨基酸/迪辅乐布拉氏酵母/Akk菌/BCAA/谷氨酰胺/GOS/FOS/菊粉/抗性糊精/混合益生元/色氨酸/组氨酸/深海鱼油/维C/姜黄)
- 临床指标参考库 clinical_indicators.json:15 项(血糖/HbA1c/血红蛋白/铁蛋白/血脂四项/肝肾/尿酸/eGFR,含参考范围与干预阈值)
- 运动处方库 exercises.json:4 条(餐后散步/足尖俯卧撑/八段锦/腹部按摩)
- schema/ 三个 JSON Schema + docs/scripts/validate_kb.py 校验脚本
- 数据来源:《双人肠道菌群联合干预方案》+ 中国糖尿病/血脂/贫血等指南
Xiaogang Liao 1 vecka sedan
förälder
incheckning
2ad5c7c53f

+ 136 - 0
docs/scripts/validate_kb.py

@@ -0,0 +1,136 @@
+#!/usr/bin/env python3
+"""知识库质量校验:JSON Schema + 引用完整性。
+
+用法:
+    python3 validate_kb.py [知识库目录]
+默认校验 docs/参考资料/知识库/ 下新增的 3 个子库及其 schema。
+无 jsonschema 依赖时降级为内置结构校验。
+"""
+import json
+import re
+import sys
+from pathlib import Path
+
+KB_DIR = Path(sys.argv[1] if len(sys.argv) > 1 else "docs/参考资料/知识库")
+
+SCHEMA_FILES = {
+    "supplements.json": "schema/supplement.schema.json",
+    "clinical_indicators.json": "schema/clinical_indicator.schema.json",
+    "exercises.json": "schema/exercise.schema.json",
+}
+
+ID_PATTERNS = {
+    "supplements.json": ("supplements", "id", re.compile(r"^sup-[a-z0-9-]+$")),
+    "clinical_indicators.json": ("indicators", "id", re.compile(r"^ind-[a-z0-9-]+$")),
+    "exercises.json": ("exercises", "id", re.compile(r"^ex-[a-z0-9-]+$")),
+}
+
+CATEGORY_ENUM = {"益生菌", "益生元", "氨基酸", "维生素", "矿物质", "脂肪酸", "植物提取物"}
+TIMING_ENUM = {"晨起空腹", "早餐后", "午餐后", "晚餐后", "睡前", "可选"}
+FORM_ENUM = {"粉剂", "胶囊", "片剂", "滴剂", "颗粒", "液体"}
+EX_TYPE_ENUM = {"有氧", "抗阻", "柔韧", "平衡", "其他"}
+EX_INTENSITY_ENUM = {"低", "中低", "中", "中高", "高"}
+
+
+def load(path: Path):
+    try:
+        return json.loads(path.read_text(encoding="utf-8"))
+    except Exception as e:  # noqa: BLE001
+        raise SystemExit(f"JSON 解析失败: {path} -> {e}")
+
+
+def class_check(field, value, allowed, errors, where):
+    if value not in allowed:
+        errors.append(f"{where}.{field}={value!r} 不在枚举 {sorted(allowed)} 内")
+
+
+def validate_doc(path: Path, schema_path, kind):
+    errors = []
+    doc = {"doc": load(path), "schema": load(schema_path)}
+    root = doc["doc"]
+    items = root.get(kind)
+    if items is None:
+        raise SystemExit(f"{path} 缺少顶层数组字段 {kind}")
+
+    seen = set()
+    for i, item in enumerate(items):
+        where = f"{path.name}[{i}]"
+        if not isinstance(item, dict):
+            errors.append(f"{where} 不是对象")
+            continue
+        id_key = ID_PATTERNS[path.name][1]
+        if id_key not in item:
+            errors.append(f"{where} 缺 id")
+        else:
+            iid = item[id_key]
+            if iid in seen:
+                errors.append(f"{where} 重复 id: {iid}")
+            seen.add(iid)
+            pat = ID_PATTERNS[path.name][2]
+            if not pat.match(iid):
+                errors.append(f"{where} id={iid!r} 不匹配 {pat.pattern}")
+
+    if path.name == "supplements.json":
+        for i, item in enumerate(items):
+            where = f"{path.name}[{i}]"
+            for req in ("name", "category", "key_ingredients", "form", "dose_reference", "timing"):
+                if req not in item:
+                    errors.append(f"{where} 缺必需字段 {req}")
+            class_check("category", item.get("category"), CATEGORY_ENUM, errors, where)
+            class_check("timing", item.get("timing"), TIMING_ENUM, errors, where)
+            class_check("form", item.get("form"), FORM_ENUM, errors, where)
+            for ing in item.get("key_ingredients", []):
+                if ing.get("name") is None or ing.get("amount") is None:
+                    errors.append(f"{where}.key_ingredients 缺 name/amount")
+    elif path.name == "clinical_indicators.json":
+        for i, item in enumerate(items):
+            where = f"{path.name}[{i}]"
+            for req in ("name", "unit", "normal_range"):
+                if req not in item:
+                    errors.append(f"{where} 缺必需字段 {req}")
+            nr = item.get("normal_range", {})
+            if not isinstance(nr, dict) or "low" not in nr or "high" not in nr:
+                errors.append(f"{where}.normal_range 需含 low/high")
+    elif path.name == "exercises.json":
+        for i, item in enumerate(items):
+            where = f"{path.name}[{i}]"
+            for req in ("name", "type", "intensity", "duration_min", "frequency"):
+                if req not in item:
+                    errors.append(f"{where} 缺必需字段 {req}")
+            class_check("type", item.get("type"), EX_TYPE_ENUM, errors, where)
+            class_check("intensity", item.get("intensity"), EX_INTENSITY_ENUM, errors, where)
+            if not isinstance(item.get("duration_min"), int) or item.get("duration_min") < 1:
+                errors.append(f"{where}.duration_min 需为正整数")
+
+    return errors
+
+
+def main():
+    failed = False
+    for data_name, schema_rel in SCHEMA_FILES.items():
+        data_path = KB_DIR / data_name
+        schema_path = KB_DIR / schema_rel
+        if not data_path.exists():
+            print(f"[SKIP] {data_path} 不存在")
+            failed = True
+            continue
+        if not schema_path.exists():
+            print(f"[FAIL] schema 缺失: {schema_path}")
+            failed = True
+            continue
+        kind = ID_PATTERNS[data_name][0]
+        errors = validate_doc(data_path, schema_path, kind)
+        if errors:
+            failed = True
+            print(f"[FAIL] {data_name}: {len(errors)} 个问题")
+            for e in errors[:15]:
+                print("   -", e)
+        else:
+            print(f"[ OK ] {data_name} 校验通过")
+
+    print("RESULT:", "FAIL" if failed else "PASS")
+    sys.exit(1 if failed else 0)
+
+
+if __name__ == "__main__":
+    main()

+ 186 - 0
docs/参考资料/知识库/clinical_indicators.json

@@ -0,0 +1,186 @@
+{
+  "version": "1.0",
+  "updated": "2026-10-13",
+  "indicators": [
+    {
+      "id": "ind-fpg",
+      "name": "空腹血糖",
+      "english_name": "Fasting Plasma Glucose (FPG)",
+      "unit": "mmol/L",
+      "normal_range": { "low": 3.9, "high": 6.1 },
+      "risk_thresholds": { "low_warn": 3.9, "high_warn": 7.0, "note": "3.9-6.1 正常;6.1-7.0 空腹血糖受损(糖尿病前期);≥7.0 提示糖尿病" },
+      "monitoring_frequency_hint": "每周监测(空腹+餐后2h)",
+      "related_condition": "II型糖尿病",
+      "population_note": null,
+      "source": "双人肠道菌群联合干预方案 + 中华医学会糖尿病学分会参考"
+    },
+    {
+      "id": "ind-pg2h",
+      "name": "餐后2小时血糖",
+      "english_name": "2-hour Postprandial Glucose (2hPG)",
+      "unit": "mmol/L",
+      "normal_range": { "low": null, "high": 7.8 },
+      "risk_thresholds": { "low_warn": null, "high_warn": 11.1, "note": "<7.8 正常;7.8-11.1 糖耐量受损;≥11.1 提示糖尿病" },
+      "monitoring_frequency_hint": "每周监测",
+      "related_condition": "II型糖尿病",
+      "population_note": null,
+      "source": "双人肠道菌群联合干预方案 + 中华医学会糖尿病学分会参考"
+    },
+    {
+      "id": "ind-hba1c",
+      "name": "糖化血红蛋白",
+      "english_name": "Hemoglobin A1c (HbA1c)",
+      "unit": "%",
+      "normal_range": { "low": 4.0, "high": 6.0 },
+      "risk_thresholds": { "low_warn": null, "high_warn": 7.5, "note": "≥6.5% 提示糖尿病;老年糖尿病者控制目标建议<7.5%" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "II型糖尿病",
+      "population_note": "老年患者放宽控制目标,避免低血糖",
+      "source": "双人肠道菌群联合干预方案 + 中华医学会糖尿病学分会参考"
+    },
+    {
+      "id": "ind-hb",
+      "name": "血红蛋白",
+      "english_name": "Hemoglobin (Hb)",
+      "unit": "g/L",
+      "normal_range": { "low": 115, "high": 175 },
+      "risk_thresholds": { "low_warn": 120, "high_warn": null, "note": "<120(男)/<110(女)提示贫血;本干预以改善铁缺乏性贫血为目标" },
+      "monitoring_frequency_hint": "4周复查",
+      "related_condition": "缺铁性贫血",
+      "population_note": "男 130-175,女 115-150",
+      "source": "双人肠道菌群联合干预方案 + 中国贫血诊断参考"
+    },
+    {
+      "id": "ind-ferritin",
+      "name": "血清铁蛋白",
+      "english_name": "Serum Ferritin (SF)",
+      "unit": "ng/mL",
+      "normal_range": { "low": 15, "high": 400 },
+      "risk_thresholds": { "low_warn": 30, "high_warn": null, "note": "<30 提示缺铁;储存铁不足评估首选指标;>400 需排查慢性炎症" },
+      "monitoring_frequency_hint": "8-12周复查",
+      "related_condition": "缺铁性贫血",
+      "population_note": "男 30-400,女 15-200",
+      "source": "双人肠道菌群联合干预方案"
+    },
+    {
+      "id": "ind-tc",
+      "name": "总胆固醇",
+      "english_name": "Total Cholesterol (TC)",
+      "unit": "mmol/L",
+      "normal_range": { "low": null, "high": 5.2 },
+      "risk_thresholds": { "low_warn": null, "high_warn": 6.2, "note": ">6.2 高胆固醇血症" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "血脂异常",
+      "population_note": null,
+      "source": "双人肠道菌群联合干预方案 + 中国成人血脂异常防治指南"
+    },
+    {
+      "id": "ind-tg",
+      "name": "甘油三酯",
+      "english_name": "Triglyceride (TG)",
+      "unit": "mmol/L",
+      "normal_range": { "low": null, "high": 1.7 },
+      "risk_thresholds": { "low_warn": null, "high_warn": 2.3, "note": ">2.3 升高,≥5.6 高甘油三酯血症(胰腺炎风险)" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "血脂异常",
+      "population_note": null,
+      "source": "双人肠道菌群联合干预方案 + 中国成人血脂异常防治指南"
+    },
+    {
+      "id": "ind-ldlc",
+      "name": "低密度脂蛋白胆固醇",
+      "english_name": "LDL-C",
+      "unit": "mmol/L",
+      "normal_range": { "low": null, "high": 3.4 },
+      "risk_thresholds": { "low_warn": null, "high_warn": 4.1, "note": ">4.1 显著升高;高危人群目标<2.6" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "血脂异常",
+      "population_note": null,
+      "source": "双人肠道菌群联合干预方案 + 中国成人血脂异常防治指南"
+    },
+    {
+      "id": "ind-hdlc",
+      "name": "高密度脂蛋白胆固醇",
+      "english_name": "HDL-C",
+      "unit": "mmol/L",
+      "normal_range": { "low": 1.0, "high": null },
+      "risk_thresholds": { "low_warn": 1.0, "high_warn": null, "note": "男<1.0、女<1.3 提示降低(心血管风险升高)" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "血脂异常",
+      "population_note": "男>1.0,女>1.3",
+      "source": "双人肠道菌群联合干预方案 + 中国成人血脂异常防治指南"
+    },
+    {
+      "id": "ind-alt",
+      "name": "丙氨酸氨基转移酶",
+      "english_name": "Alanine Transaminase (ALT)",
+      "unit": "U/L",
+      "normal_range": { "low": null, "high": 40 },
+      "risk_thresholds": { "low_warn": null, "high_warn": 80, "note": ">80 明显升高,提示肝细胞损伤" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "肝病",
+      "population_note": "男<50,女<40",
+      "source": "双人肠道菌群联合干预方案 + 临床检验参考"
+    },
+    {
+      "id": "ind-ast",
+      "name": "天门冬氨酸氨基转移酶",
+      "english_name": "Aspartate Transaminase (AST)",
+      "unit": "U/L",
+      "normal_range": { "low": null, "high": 40 },
+      "risk_thresholds": { "low_warn": null, "high_warn": 80, "note": "与ALT联用评估肝损伤;AST/ALT比值提示肝损类型" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "肝病",
+      "population_note": "男<45,女<40",
+      "source": "双人肠道菌群联合干预方案 + 临床检验参考"
+    },
+    {
+      "id": "ind-bun",
+      "name": "尿素",
+      "english_name": "Blood Urea Nitrogen (BUN)",
+      "unit": "mmol/L",
+      "normal_range": { "low": 2.9, "high": 8.2 },
+      "risk_thresholds": { "low_warn": null, "high_warn": 14.3, "note": ">14.3 提示肾功能下降或高蛋白摄入;<2.9 提示营养不良" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "肾病",
+      "population_note": null,
+      "source": "双人肠道菌群联合干预方案 + 临床检验参考"
+    },
+    {
+      "id": "ind-cre",
+      "name": "肌酐",
+      "english_name": "Creatinine (Cr)",
+      "unit": "μmol/L",
+      "normal_range": { "low": 41, "high": 111 },
+      "risk_thresholds": { "low_warn": null, "high_warn": 133, "note": ">133 提示肾功能不全" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "肾病",
+      "population_note": "男 57-111,女 41-81",
+      "source": "双人肠道菌群联合干预方案 + 临床检验参考"
+    },
+    {
+      "id": "ind-egfr",
+      "name": "肾小球滤过率",
+      "english_name": "eGFR",
+      "unit": "mL/min/1.73m²",
+      "normal_range": { "low": 90, "high": null },
+      "risk_thresholds": { "low_warn": 60, "high_warn": null, "note": "<60 提示慢性肾脏病(G3 期起);60-90 正常高值,需结合肌酐" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "肾病",
+      "population_note": "老年人偏低可接受,需纵向对比",
+      "source": "双人肠道菌群联合干预方案 + CKD-EPI 参考"
+    },
+    {
+      "id": "ind-ua",
+      "name": "尿酸",
+      "english_name": "Uric Acid (UA)",
+      "unit": "μmol/L",
+      "normal_range": { "low": null, "high": 420 },
+      "risk_thresholds": { "low_warn": null, "high_warn": 480, "note": "男>420、女>360 提示高尿酸血症" },
+      "monitoring_frequency_hint": "12周复查",
+      "related_condition": "痛风",
+      "population_note": "男<420,女<360",
+      "source": "双人肠道菌群联合干预方案 + 高尿酸血症与痛风诊疗指南"
+    }
+  ]
+}

+ 62 - 0
docs/参考资料/知识库/exercises.json

@@ -0,0 +1,62 @@
+{
+  "version": "1.0",
+  "updated": "2026-10-13",
+  "exercises": [
+    {
+      "id": "ex-walk",
+      "name": "餐后散步",
+      "aliases": ["步行", "散步15-20分钟"],
+      "type": "有氧",
+      "intensity": "低",
+      "duration_min": 15,
+      "frequency": "三餐后",
+      "timing_pref": "早/午/晚餐后15-20分钟(助控餐后血糖)",
+      "suitable_population": "老年患者、糖尿病患者降餐后血糖首选",
+      "safety_notes": "血糖<3.9 或 >16.7 mmol/L 时避免剧烈活动;空腹不散步;餐后30分钟以上为宜(本方案提前至餐后15分钟,视体力调整)",
+      "benefit_notes": "餐后运动可显著降低餐后血糖峰值",
+      "source": "双人肠道菌群联合干预方案"
+    },
+    {
+      "id": "ex-toe-stand",
+      "name": "足尖俯卧撑",
+      "aliases": ["提踵", "提踵训练"],
+      "type": "抗阻",
+      "intensity": "中低",
+      "duration_min": 5,
+      "frequency": "每日",
+      "timing_pref": "与散步穿插,或餐后完成",
+      "suitable_population": "下肢力量训练/防跌倒,可与有氧交替",
+      "safety_notes": "20-30次×2-3组;膝踝关节不稳者减量",
+      "benefit_notes": "增强小腿三头肌与核心稳定",
+      "source": "双人肠道菌群联合干预方案"
+    },
+    {
+      "id": "ex-baduanjin",
+      "name": "八段锦",
+      "aliases": ["八段锦/太极"],
+      "type": "柔韧",
+      "intensity": "低",
+      "duration_min": 20,
+      "frequency": "每日或每周5次",
+      "timing_pref": "晨起空腹后30分钟或晚餐前30分钟",
+      "suitable_population": "老年人、心血管患者低强度运动首选",
+      "safety_notes": "动作放缓,避免颈部快速转动",
+      "benefit_notes": "改善柔韧性、平衡性与肠道蠕动",
+      "source": "双人肠道菌群联合干预方案"
+    },
+    {
+      "id": "ex-abdominal-massage",
+      "name": "腹部顺时针按摩",
+      "aliases": ["腹部按摩"],
+      "type": "其他",
+      "intensity": "低",
+      "duration_min": 5,
+      "frequency": "每日2次",
+      "timing_pref": "睡前或晨起空腹后",
+      "suitable_population": "便秘/腹胀人群促肠道蠕动",
+      "safety_notes": "饭后1小时内避免;力度适中",
+      "benefit_notes": "促进肠道蠕动、缓解腹胀",
+      "source": "双人肠道菌群联合干预方案"
+    }
+  ]
+}

+ 51 - 0
docs/参考资料/知识库/schema/clinical_indicator.schema.json

@@ -0,0 +1,51 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#",
+  "$id": "clinical_indicator.schema.json",
+  "title": "临床监测指标参考库 Schema",
+  "description": "临床化验指标参考范围与干预阈值(单位为人医检验单位),用于复查结果判读与异常告警。",
+  "type": "object",
+  "required": ["version", "updated", "indicators"],
+  "properties": {
+    "version": { "type": "string" },
+    "updated": { "type": "string", "format": "date" },
+    "indicators": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "type": "object",
+        "required": ["id", "name", "unit", "normal_range"],
+        "properties": {
+          "id": { "type": "string", "pattern": "^ind-[a-z0-9-]+$" },
+          "name": { "type": "string" },
+          "english_name": { "type": "string" },
+          "unit": { "type": "string", "examples": ["mmol/L", "g/L", "ng/mL", "%", "U/L", "μmol/L"] },
+          "normal_range": {
+            "type": "object",
+            "required": ["low", "high"],
+            "properties": {
+              "low": { "type": ["number", "null"] },
+              "high": { "type": ["number", "null"] }
+            },
+            "additionalProperties": false
+          },
+          "risk_thresholds": {
+            "type": "object",
+            "description": "干预阈值:超出提示就医/干预",
+            "properties": {
+              "low_warn": { "type": ["number", "null"] },
+              "high_warn": { "type": ["number", "null"] },
+              "note": { "type": "string" }
+            },
+            "additionalProperties": false
+          },
+          "monitoring_frequency_hint": { "type": "string", "description": "复查频率建议(如每周/4周/12周)" },
+          "related_condition": { "type": "string" },
+          "population_note": { "type": "string", "description": "性别/年龄分组参考差异" },
+          "source": { "type": "string" }
+        },
+        "additionalProperties": false
+      }
+    }
+  },
+  "additionalProperties": false
+}

+ 36 - 0
docs/参考资料/知识库/schema/exercise.schema.json

@@ -0,0 +1,36 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#",
+  "$id": "exercise.schema.json",
+  "title": "运动处方库 Schema",
+  "description": "干预方案中运动条目的结构化定义(类型/强度/时长/频率/禁忌)。",
+  "type": "object",
+  "required": ["version", "updated", "exercises"],
+  "properties": {
+    "version": { "type": "string" },
+    "updated": { "type": "string", "format": "date" },
+    "exercises": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "type": "object",
+        "required": ["id", "name", "type", "intensity", "duration_min", "frequency"],
+        "properties": {
+          "id": { "type": "string", "pattern": "^ex-[a-z0-9-]+$" },
+          "name": { "type": "string" },
+          "aliases": { "type": "array", "items": { "type": "string" } },
+          "type": { "enum": ["有氧", "抗阻", "柔韧", "平衡", "其他"] },
+          "intensity": { "enum": ["低", "中低", "中", "中高", "高"] },
+          "duration_min": { "type": "integer", "minimum": 1 },
+          "frequency": { "type": "string", "examples": ["每日", "三餐后", "每周5次"] },
+          "timing_pref": { "type": "string", "description": "时段偏好(如餐后30分钟,助控餐后血糖)" },
+          "suitable_population": { "type": "string" },
+          "safety_notes": { "type": "string", "description": "血糖/心功能等安全边界" },
+          "benefit_notes": { "type": "string" },
+          "source": { "type": "string" }
+        },
+        "additionalProperties": false
+      }
+    }
+  },
+  "additionalProperties": false
+}

+ 50 - 0
docs/参考资料/知识库/schema/supplement.schema.json

@@ -0,0 +1,50 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#",
+  "$id": "supplement.schema.json",
+  "title": "补充剂库 Schema",
+  "description": "商品化补充剂/益生菌/益生元条目。覆盖双人肠道菌群联合干预方案用到的全部补剂。",
+  "type": "object",
+  "required": ["version", "updated", "supplements"],
+  "properties": {
+    "version": { "type": "string", "examples": ["1.0"] },
+    "updated": { "type": "string", "format": "date" },
+    "supplements": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "type": "object",
+        "required": ["id", "name", "category", "key_ingredients", "form", "dose_reference", "timing"],
+        "properties": {
+          "id": { "type": "string", "pattern": "^sup-[a-z0-9-]+$" },
+          "name": { "type": "string" },
+          "brand": { "type": "string" },
+          "category": { "enum": ["益生菌", "益生元", "氨基酸", "维生素", "矿物质", "脂肪酸", "植物提取物"] },
+          "key_ingredients": {
+            "type": "array",
+            "minItems": 1,
+            "items": {
+              "type": "object",
+              "required": ["name", "amount"],
+              "properties": {
+                "name": { "type": "string" },
+                "amount": { "type": "string", "examples": ["500mg/粒", "50亿CFU/袋"] }
+              },
+              "additionalProperties": false
+            }
+          },
+          "form": { "enum": ["粉剂", "胶囊", "片剂", "滴剂", "颗粒", "液体"] },
+          "dose_reference": { "type": "string", "description": "参考剂量与加量节奏" },
+          "timing": { "enum": ["晨起空腹", "早餐后", "午餐后", "晚餐后", "睡前", "可选"] },
+          "timing_notes": { "type": "string" },
+          "interaction_notes": { "type": "string", "description": "与药物/食物/其他补剂的相互作用注意" },
+          "contraindications": { "type": ["string", "null"] },
+          "evidence_level": { "enum": ["1", "2", "3"], "description": "证据强度:1 较弱 / 2 中等 / 3 较强" },
+          "source": { "type": "string" },
+          "enabled": { "type": "boolean", "default": true }
+        },
+        "additionalProperties": false
+      }
+    }
+  },
+  "additionalProperties": false
+}

+ 282 - 0
docs/参考资料/知识库/supplements.json

@@ -0,0 +1,282 @@
+{
+  "version": "1.0",
+  "updated": "2026-10-13",
+  "supplements": [
+    {
+      "id": "sup-lelichang50",
+      "name": "乐力畅50+益生菌(无糖)",
+      "brand": "乐力畅",
+      "category": "益生菌",
+      "key_ingredients": [{ "name": "复合益生菌", "amount": "≥50亿CFU/袋" }],
+      "form": "粉剂",
+      "dose_reference": "晨起空腹 1袋;第一周半袋起步,无胀气再加到1袋;维持期1-2袋/日",
+      "timing": "晨起空腹",
+      "timing_notes": "空腹服用避开胃酸高峰,吸收更佳",
+      "interaction_notes": "与抗生素间隔2小时以上",
+      "contraindications": null,
+      "evidence_level": "3",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-lifeineng-iron",
+      "name": "力蜚能多糖铁复合物胶囊",
+      "brand": "力蜚能",
+      "category": "矿物质",
+      "key_ingredients": [{ "name": "多糖铁复合物", "amount": "1粒(约150mg铁)" }],
+      "form": "胶囊",
+      "dose_reference": "早餐后1粒,需长期补铁者隔日1粒;与维C同服促吸收",
+      "timing": "早餐后",
+      "timing_notes": "餐后温水送服",
+      "interaction_notes": "与姜黄/钙片/茶/咖啡错开2小时以上(抑制铁吸收)",
+      "contraindications": null,
+      "evidence_level": "3",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-vitamin-c",
+      "name": "维生素C",
+      "brand": null,
+      "category": "维生素",
+      "key_ingredients": [{ "name": "维生素C", "amount": "100mg/片" }],
+      "form": "片剂",
+      "dose_reference": "早餐后1片,与铁剂同服促铁吸收",
+      "timing": "早餐后",
+      "timing_notes": "与铁剂同服可提高铁吸收率",
+      "interaction_notes": null,
+      "contraindications": null,
+      "evidence_level": "3",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-bcaa",
+      "name": "康比特BCAA支链氨基酸粉(无糖)",
+      "brand": "康比特",
+      "category": "氨基酸",
+      "key_ingredients": [{ "name": "支链氨基酸(亮氨酸/异亮氨酸/缬氨酸)", "amount": "2.5g起,第三阶段5g" }],
+      "form": "粉剂",
+      "dose_reference": "午餐后2.5g(阶段二)→ 5g(阶段三);可与低聚半乳糖同服",
+      "timing": "午餐后",
+      "timing_notes": "可与BCAA/益生元同服",
+      "interaction_notes": null,
+      "contraindications": null,
+      "evidence_level": "2",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-glutamine",
+      "name": "L-谷氨酰胺",
+      "brand": null,
+      "category": "氨基酸",
+      "key_ingredients": [{ "name": "L-谷氨酰胺", "amount": "2.5g起,第三阶段2-3g" }],
+      "form": "粉剂",
+      "dose_reference": "午餐后2.5g(阶段二)→ 2-3g(阶段三)",
+      "timing": "午餐后",
+      "timing_notes": null,
+      "interaction_notes": null,
+      "contraindications": null,
+      "evidence_level": "2",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-gos",
+      "name": "低聚半乳糖GOS",
+      "brand": null,
+      "category": "益生元",
+      "key_ingredients": [{ "name": "低聚半乳糖", "amount": "2.5-5g" }],
+      "form": "粉剂",
+      "dose_reference": "午餐后2.5-5g(阶段二)→ 5g(阶段三);与少量菊粉合用喂养双歧/乳杆菌",
+      "timing": "午餐后",
+      "timing_notes": "可与BCAA同服",
+      "interaction_notes": "胀气者从半量起步、逐步增量",
+      "contraindications": null,
+      "evidence_level": "2",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-fos",
+      "name": "低聚果糖FOS",
+      "brand": null,
+      "category": "益生元",
+      "key_ingredients": [{ "name": "低聚果糖", "amount": "5-10g" }],
+      "form": "粉剂",
+      "dose_reference": "午餐后/晚餐后5-10g,从半量(2.5-5g)起步,第二周逐步加到全量",
+      "timing": "可选",
+      "timing_notes": "与抗性糊精合计益生元总量10g/日起步,第二周后10-15g/日",
+      "interaction_notes": null,
+      "contraindications": null,
+      "evidence_level": "3",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-inulin",
+      "name": "菊粉",
+      "brand": null,
+      "category": "益生元",
+      "key_ingredients": [{ "name": "菊粉型果聚糖", "amount": "2.5-5g" }],
+      "form": "粉剂",
+      "dose_reference": "作为混合益生元组分之一,与FOS/抗性糊精搭配;从半量起步防胀气",
+      "timing": "可选",
+      "timing_notes": "Akk菌带菊粉款式中作为载体",
+      "interaction_notes": "胀气者从半粒/半量起步",
+      "contraindications": null,
+      "evidence_level": "3",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-resistant-dextrin",
+      "name": "抗性糊精",
+      "brand": null,
+      "category": "益生元",
+      "key_ingredients": [{ "name": "抗性糊精", "amount": "2.5-5g" }],
+      "form": "粉剂",
+      "dose_reference": "与低聚果糖合计益生元10g/日起步,第二周加到各5g/日(合计10-15g/日)",
+      "timing": "可选",
+      "timing_notes": null,
+      "interaction_notes": null,
+      "contraindications": null,
+      "evidence_level": "2",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-mixed-prebiotic",
+      "name": "混合益生元(FOS+菊粉+抗性糊精)",
+      "brand": null,
+      "category": "益生元",
+      "key_ingredients": [
+        { "name": "低聚果糖FOS", "amount": "5-10g" },
+        { "name": "菊粉", "amount": "2.5-5g" },
+        { "name": "抗性糊精", "amount": "2.5-5g" }
+      ],
+      "form": "粉剂",
+      "dose_reference": "晚餐后10-15g,全面喂养内源有益菌(特别是产丁酸菌)",
+      "timing": "晚餐后",
+      "timing_notes": "维持期益生元总量10-15g/日",
+      "interaction_notes": null,
+      "contraindications": null,
+      "evidence_level": "3",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-hean-amino",
+      "name": "和安复方氨基酸胶囊(8-11)",
+      "brand": "和安",
+      "category": "氨基酸",
+      "key_ingredients": [{ "name": "复方氨基酸+维生素B1等", "amount": "1粒" }],
+      "form": "胶囊",
+      "dose_reference": "晚餐后1粒",
+      "timing": "晚餐后",
+      "timing_notes": "胶囊已含维生素B1(不必额外补充)",
+      "interaction_notes": null,
+      "contraindications": null,
+      "evidence_level": "1",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-difler-boulardii",
+      "name": "迪辅乐布拉氏酵母菌滴剂",
+      "brand": "迪辅乐",
+      "category": "益生菌",
+      "key_ingredients": [{ "name": "布拉氏酵母菌", "amount": "5滴" }],
+      "form": "滴剂",
+      "dose_reference": "晚餐后5滴",
+      "timing": "晚餐后",
+      "timing_notes": "可常温保存",
+      "interaction_notes": null,
+      "contraindications": null,
+      "evidence_level": "2",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-akkermansia",
+      "name": "Akk菌(嗜黏蛋白阿克曼菌,灭活+菊粉)",
+      "brand": null,
+      "category": "益生菌",
+      "key_ingredients": [{ "name": "Akkermansia muciniphila(巴氏灭活)", "amount": "半粒~1粒" }],
+      "form": "胶囊",
+      "dose_reference": "早餐后半粒起步(带菊粉款式),无胀气再加到1粒",
+      "timing": "早餐后",
+      "timing_notes": "与铁剂错开2小时(避免影响吸收)",
+      "interaction_notes": "与铁剂错开2小时",
+      "contraindications": "炎症水平高/免疫抑制者慎用",
+      "evidence_level": "2",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-tryptophan",
+      "name": "L-色氨酸",
+      "brand": null,
+      "category": "氨基酸",
+      "key_ingredients": [{ "name": "L-色氨酸", "amount": "500mg/粒" }],
+      "form": "胶囊",
+      "dose_reference": "睡前半粒起步,观察睡眠改善;白天嗜睡则减量,无嗜睡再加到1粒",
+      "timing": "睡前",
+      "timing_notes": "改善色氨酸不足+助眠",
+      "interaction_notes": "与SSRI类抗抑郁药同服需谨慎(5-HT综合征风险)",
+      "contraindications": "正在服用SSRI/单胺氧化酶抑制剂者须咨询医生",
+      "evidence_level": "2",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-histidine",
+      "name": "L-组氨酸",
+      "brand": null,
+      "category": "氨基酸",
+      "key_ingredients": [{ "name": "L-组氨酸", "amount": "500mg/粒" }],
+      "form": "胶囊",
+      "dose_reference": "睡前500mg(可选)",
+      "timing": "睡前",
+      "timing_notes": "组胺前体,抗氧化防御原料",
+      "interaction_notes": null,
+      "contraindications": null,
+      "evidence_level": "1",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-fish-oil",
+      "name": "深海鱼油",
+      "brand": null,
+      "category": "脂肪酸",
+      "key_ingredients": [{ "name": "DHA+EPA", "amount": "1粒" }],
+      "form": "胶囊",
+      "dose_reference": "早餐后1粒(第三阶段加入)",
+      "timing": "早餐后",
+      "timing_notes": "配合降低甘油三酯、抗炎",
+      "interaction_notes": "与抗凝药物(华法林等)同服需谨慎",
+      "contraindications": "服用抗凝药者咨询医生",
+      "evidence_level": "2",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": true
+    },
+    {
+      "id": "sup-turmeric",
+      "name": "Enagic Kangen Ukon 姜黄胶囊(姜黄素)",
+      "brand": "Kangen Ukon",
+      "category": "植物提取物",
+      "key_ingredients": [{ "name": "姜黄素", "amount": "1-2粒" }],
+      "form": "胶囊",
+      "dose_reference": "早餐后1-2粒(阶段二);阶段三减为1粒",
+      "timing": "早餐后",
+      "timing_notes": "本方案中暂不建议:炎症水平低且姜黄影响铁吸收,先补铁再说;除非有明确炎症或关节痛",
+      "interaction_notes": "影响铁吸收,与铁剂错开2小时以上",
+      "contraindications": "正在服用抗凝药者慎用(抗血小板作用)",
+      "evidence_level": "2",
+      "source": "双人肠道菌群联合干预方案",
+      "enabled": false
+    }
+  ]
+}