Commit 99b39c08 by luoqi

fix(ingest): treat_plan 的复查/拆线/暂观归为 actual(本次治疗),不再误落治疗计划

EMR.treat_plan = 本次治疗(actual,本次确实做了);EMR.plan = 治疗计划(planned)。
treatment_review_rows 100% 来自 treat_plan(plan 字段的复查项当前 drop),
但 treatment_review.yaml 原写死 action=treatment_planned → parser 推 kind=planned,
导致"拆线/复查/暂观"等本次做的事被错误落到「治疗计划」。

修复:treatment_review.yaml action → treatment_completed(kind=actual / status=fulfilled)。
- 韩滨 2024-04-07 拆线 18;48 现正确落「本次治疗」,与源数据 treat_plan 一致
- 验证无副作用:chain S4 复查信号按 category='review' 匹配(不看 kind);
  review 已排除在 actual 治疗链 S3 外、不触发 scenario ⑤a → 召回逻辑不受影响
- 留注释:未来若 union EMR.plan 的复查项进来(那才是 planned),需按来源分流 kind

至此 treatment_record 的 kind 完全由来源字段决定:treat_plan→actual / plan→planned。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 354eaecd
# treatment_review — 复查 / 拆线 / 暂观 / 无治疗 等流程性事实
# 消费 transforms 输出表 treatment_review_rows(route_by_pattern 已分流)
# 全部 fact 都打 category='review'(canonical-codes 第 11 类)
#
# ⭐ kind=actual:treatment_review_rows 100% 来自 EMR.treat_plan(=本次治疗 actual,
# 本次确实做了的复查/拆线/暂观/流程事件);EMR.plan 字段的复查项当前是 drop 的。
# 旧版误写 kind=planned → 拆线等"本次做的"被错误落到「治疗计划」。
# ⚠️ 未来若把 EMR.plan 的复查项 union 进来(那才是 planned/未来),需按来源分流 kind,
# 不能再共用本 assembler 的固定 actual(见 manifest C.4 TODO)。
canonical: treatment
emits:
action: treatment_planned
action: treatment_completed # → parser 推 kind=actual / status=fulfilled(本次已做)
subjectType: treatment
occurredAtField: occurredAt
kind: planned # 复查 / 暂观 都是"未来安排"语义,kind=planned
kind: actual
primary:
table: treatment_review_rows
......
......@@ -266,7 +266,7 @@ transforms:
# 数据流:
# treat_plan → split → route:
# ① 建议/推荐 → recommendation_rows (kind=planned,医生当场给的健康路径)
# ② 复查/暂观 → treatment_review_rows (kind=planned,本次做的复查,chain S4 信号)
# ② 复查/暂观 → treatment_review_rows (kind=actual,本次做的复查/拆线,chain S4 信号)
# ③ 真治疗 → treatment_actual_rows ⭐ (kind=actual,临床真实,带牙位 48.7%)
#
# plan → split → route:
......
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