Commit a4973449 by luoqi

fix(chain): 替代闭环类别补 cosmetic(贴面)+ altSources 去重

markAlternativeClosed 的 ALT_CATS 漏了 cosmetic — 同牙做了贴面(定性修复)
不算"已被替代",导致 K00 乳牙滞留链卡在 discovered:
  李梦维 K00 1B;4C — 4C 粘结桥(prosthodontic 已覆盖)+ 1B 贴面(cosmetic 漏判)
  → 全牙位覆盖闸不通过 → 链一直"已发现",实际两颗都已修复。
加 cosmetic 后两颗全覆盖 → 链闭环(已被替代);画像缺口 2→1(只剩种植46,与召回一致)。
顺带 altSources 去重(同牙多条同类 actual 如"贴面修复+戴贴面"会重复)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 22d8ccbc
...@@ -154,7 +154,10 @@ function filterDiscoveredByPatientLevel(chains: ComposedChain[]): ComposedChain[ ...@@ -154,7 +154,10 @@ function filterDiscoveredByPatientLevel(chains: ComposedChain[]): ComposedChain[
} }
function markAlternativeClosed(chains: ComposedChain[], byType: FactsByType): void { function markAlternativeClosed(chains: ComposedChain[], byType: FactsByType): void {
const ALT_CATS = new Set(['implant', 'surgical', 'prosthodontic']); // 定性替代治疗类别 — 同牙做了这些 = 原诊断已被替代方案处置(占位/修复/拔除)。
// cosmetic(贴面)与 prosthodontic(冠桥)同属定性修复:李梦维 K00 乳牙滞留 1B;4C —
// 4C 粘结桥(prosthodontic)+ 1B 贴面(cosmetic),两颗都已修复,链应闭环(原缺 cosmetic 漏判 1B)。
const ALT_CATS = new Set(['implant', 'surgical', 'prosthodontic', 'cosmetic']);
// ⭐ W4 末改造:扫 fact 而非 chain // ⭐ W4 末改造:扫 fact 而非 chain
// 原因:surgical(拔除)往往是"actual-only"链 — 无对应 dx sig,bucket.tooth='', // 原因:surgical(拔除)往往是"actual-only"链 — 无对应 dx sig,bucket.tooth='',
// 被原版 markAlternativeClosed(看 chain.toothPosition)跳过。 // 被原版 markAlternativeClosed(看 chain.toothPosition)跳过。
...@@ -204,10 +207,10 @@ function markAlternativeClosed(chains: ComposedChain[], byType: FactsByType): vo ...@@ -204,10 +207,10 @@ function markAlternativeClosed(chains: ComposedChain[], byType: FactsByType): vo
if (hit) altSources.push(`${CATEGORY_LABEL[txCat] ?? txCat}·${txTooth}`); if (hit) altSources.push(`${CATEGORY_LABEL[txCat] ?? txCat}·${txTooth}`);
} }
if (altCovered.size === cToothSet.size && altCovered.size > 0) { if (altCovered.size === cToothSet.size && altCovered.size > 0) {
// 全覆盖 → alt-closed // 全覆盖 → alt-closed;altSources 去重(同牙多条同类 actual 会重复,如 1B 贴面修复+戴贴面)
c.status = 'closed'; c.status = 'closed';
c.target = false; c.target = false;
c.alternativeClosedBy = altSources.join(' / '); c.alternativeClosedBy = [...new Set(altSources)].join(' / ');
c.currentStage = 5; c.currentStage = 5;
} }
} }
......
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