Commit 4bc0ebe7 by luoqi

feat: 场景名 启治召回→应治未治 + verify-recall §C5 码名怪码哨兵

- UI 场景标签'启治召回'→'应治未治'(labels.ts 单一源,列表/详情 chip 全跟随;mock fallback 同改)。
- verify-recall §C5:诊断码诊断名 语义不符监测('召回了也可能不一致'的守门 — 召回基于码,
  码≠名的怪码会召错科目)。命中'异类关键词'且'本码自身关键词缺席'(排多病名拼接噪声)。
  DW 全量审计(阈值降到5):唯一系统性怪码 = K07.303 牙体缺损(1083患者),已 recode 修;
  §C5 现 ~0(仅 1 条多行多病名噪声)→ 哨兵留守,未来新怪码会现形。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parent fc481b9e
......@@ -194,3 +194,28 @@ GROUP BY d.code;
-- vt_ortho_pt 已在 vt_final 前建好(给 x_orthoextract 用),此处直接复用
SELECT count(DISTINCT f.patient_id) AS k08_ortho_ctx_patients
FROM vt_final f WHERE f.code='K08' AND f.recalled AND f.patient_id IN (SELECT patient_id FROM vt_ortho_pt);
-- ════════════════════════════════════════════════════════════════════════
-- §C5 诊断码 ↔ 诊断名 语义不符(怪码监测)
-- '召回了也可能不一致':召回基于诊断【码】,若宿主 ICD 怪码让【码】与【名】矛盾(如 K07.303
-- 牙体缺损被编 K07=正畸 → 召正畸),召回就召错了科目。这层独立查 code vs name 是否同类:
-- 命中 = 疑似怪码 → 该进 manifest recode map(如已加 K07.303→K03,这里应归 0)。
-- ════════════════════════════════════════════════════════════════════════
\echo '════════ §C5 诊断码↔诊断名 语义不符(怪码监测;recode 修过的应=0)════════'
SELECT content->>'code' AS code, content->>'name_zh' AS name_zh,
count(*) AS n, count(DISTINCT patient_id) AS pts
FROM patient_facts
WHERE type='diagnosis_record' AND status='active'
-- 命中"异类关键词" 且 "本码自身关键词缺席"(后者排多病名拼接如"龋齿、阻生齿"→K01 仍合理)
AND (
(content->>'code'='K07' AND content->>'name_zh' ~ '缺损|龋|根管|残根|缺失|牙髓|牙周炎' AND content->>'name_zh' !~ '错|畸|正畸|拥挤|不齐|间隙|反合|覆合|覆盖|开合|锁合|移位|扭转|异位|位置异常|关节') OR
(content->>'code'='K02' AND content->>'name_zh' ~ '缺失|正畸|错[合颌]|阻生' AND content->>'name_zh' !~ '龋|齲|蛀') OR
(content->>'code'='K08' AND content->>'name_zh' ~ '龋|正畸|牙髓|阻生' AND content->>'name_zh' !~ '缺失|缺牙') OR
(content->>'code'='K04' AND content->>'name_zh' ~ '正畸|缺失|阻生' AND content->>'name_zh' !~ '牙髓|根尖|髓') OR
(content->>'code'='K01' AND content->>'name_zh' ~ '龋|缺失牙|正畸' AND content->>'name_zh' !~ '阻生|埋伏|智齿') OR
(content->>'code'='K05' AND content->>'name_zh' ~ '龋|缺失|正畸|阻生' AND content->>'name_zh' !~ '牙周炎|牙周病') OR
(content->>'code'='K03' AND content->>'name_zh' ~ '正畸|阻生' AND content->>'name_zh' !~ '缺损|楔|残根|残冠|隐裂|折|磨损') OR
(content->>'code'='K06' AND content->>'name_zh' ~ '龋|正畸|阻生' AND content->>'name_zh' !~ '牙龈|牙槽|龈') OR
(content->>'code'='K00' AND content->>'name_zh' ~ '龋|牙髓|牙周炎' AND content->>'name_zh' !~ '发育|萌出|多生|融合|先天')
)
GROUP BY 1,2 ORDER BY n DESC LIMIT 30;
......@@ -331,7 +331,7 @@ export const mockPlan = {
{
id: 'rsn_1',
scenario: PlanScenario.TREATMENT_INITIATION_RECALL,
scenarioLabel: '启治召回',
scenarioLabel: '应治未治',
priorityScore: 92,
lifecycle: 'one_shot',
source: 'algorithm',
......
......@@ -25,7 +25,7 @@ export type Tone =
export const PLAN_SCENARIO_LABEL: Record<string, string> = {
[PlanScenario.TREATMENT_AFTERCARE_RECALL]: '疗效保障',
[PlanScenario.TREATMENT_INITIATION_RECALL]: '启治召回',
[PlanScenario.TREATMENT_INITIATION_RECALL]: '应治未治',
treatment_chain_disruption_recall: '链中断', // 待业务拍板,暂未入 enum
missed_diagnosis_recall: '漏诊召回', // W6+ 影像 AI
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment