potential-treatment.feature.ts
5.4 KB
-
fix(persona): 回填 evidence.factIds(证据链)— 7 个 fact 派生特征 · 1842fb02
#4 证据链债:多个特征返回 evidence.factIds=[],详情页'为什么贴这标签'无法溯源到 fact(违反 db 原则4)。 - 回填 7 个 fact 派生特征,收集驱动该标签的 fact id: · discount_anchor → 锚点 payment fact · special_attention → 命中的 no_show/迟到 预约 + 不可等候 emr fact(按触发标签收集) · time_preference → 窗口内计入的 appointment fact · lifecycle_stage → 就诊 + 消费 fact(去重) · treatment_sensitivity → 命中关键词的 emr fact(改 per-fact 匹配) · potential_treatment / urgency_level → gap 源 fact(PotentialGap 加 factId:selector SQL 加 sig.id) - 5 个非 fact 派生特征(age/gender/acquisition/family/referral/contraindication)保留空 + 注释说明 (证据=patient 主档/副表立柱/关系边,本就非 fact)。 - 本地 --force 重算 928:fact 派生特征 100% 有证据(discount 338/338、lifecycle 928/928、 potential 771/771、special 88/88、time 601/601、urgency 771/771);age/gender 仍 0(符合预期)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
luoqi committed