W4: 治疗链 5 阶段 + AI 话术 + DB 持久化 + 真实诊所多 brand 接入
主要工作(自 W3 末快照以来): 数据层(canonical-fact-layer): - 治疗链 5 阶段模型(chain-composer S1/S2/S3/S4/S5)+ TreatmentMilestones + TreatmentLifecycles 字典 - alternative-closed 闸:同位置后续替代治疗覆盖原诊断 → 标 closed - 同 (category, code) 桶按 tooth set overlap 合并(union-find);wholeMouth 桶 S2 修正 - chain.target = SQL 为准(按 plan_reasons.signals.triggers 对齐,plan-aggregate 注入) - diagnosis name_zh 末尾标点清理;cooldown 内不标 ★ 潜在新链 召回算法: - DiagnosisTreatmentMap K00-K09 全覆盖(加 K00/K01/K03/K06/K07/K09) - treatment_initiation_recall 10 个 sub-scenarios + 配套 *_RECOMMENDED 推荐码 - 移除 INTAKE_MAX_DAYS 上界;scenario SQL 加预约排除(任何 sig 后预约即排) - S2 改用预约主诉类别;S2 fallback 显示 planned 治疗 画像 Persona: - treatment_chain_status feature 直接复用 ChainComposerService - value/recall_risk/dnc feature 切到独立 fact_type(v2.1) - status: in ['active', 'fulfilled'] 加载兼容已完成 actual Plan 详情聚合: - /plans/:id/full 接 personas + chains + facts + 话术 - script 从 plan_scripts DB 加载,markdown 反 parse 4 段 sections,前端零适配 - 列表页搜索/过滤改服务端(W3 末) AI 话术(B 方案 重写): - DeepSeek V4 Pro → Flash 切换(call defaultModelId + config defaultModel) - schema 4 段 markdown 字符串(opening/followup/objection/close)对齐前端 mock - prompt @2026-05-24-d:few-shot demo +❌ /✅ 反例 + 事实约束硬要求 - 事实漂移防护:诊所名 JVS_DW_CLINIC_NAMES 字典翻译、牙位 FDI→俗称、 主诊医生从 facts 抽、通话称呼 nameSpokenForm(姓+先生/女士) - scenario 内部 label 禁外露,opening 必须用临床事实开场 鉴权: - A 方案 refresh token 真实实现(Redis jti rotation,无 host SSO 回调) - 详情页电话查看 icon + reveal 接口 UI: - 详情页 TopBar 跟列表页 PageHeader 风格统一 - 治疗链 5 阶段词表(chainStatusVisual) - 闭环链去"建议下一步" + 闭环时间 - WhyCard 过滤 alternative-closed reasons 数据源接入: - 5 家试点诊所 JVS DW 实接(瑞尔/瑞泰双 brand,tenant_id 路由) - yaml transforms(Layer A.5)6 operator 白名单:split/route/derive/filter/project/pick_first_nonzero - 实测 5000 患者 cohort,408K facts / 2207 plans / 0 failed 待办: - task #46 cold-import --reparse mode(yaml 改后强制重 parse) - EMR.treat_plan 语义错位(标记为 planned 实际是 actual);EMR.plan 字段未消费 - 双源 actual 去重(EMR vs settlement) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Showing
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
docs/algorithm/treatment-chain-5-stages.md
0 → 100644
docs/dw-data-source-issues.md
0 → 100644
This diff is collapsed.
Click to expand it.
packages/types/src/schemas/reason-signals.ts
0 → 100644
Please
register
or
sign in
to comment