-
W4: scenario SQL 排除升级牙位级 overlap(EMR.treat_plan 带 48.7% 牙位) · 89e68c1a
之前 ⑤a 排除是 patient + category 级("DW 限制" 注释); EMR.treat_plan 进来后 actual 带牙位,可以升级到 tooth-level overlap。 逻辑(3 路 OR): ① 信号无牙位(K05 全口诊断)→ 仍 patient/category 级 ② actual 无牙位(全口洁治/牙周治疗)→ 视为"全口覆盖"→ 仍排除 ③ 双方都有牙位 → tooth array overlap(PG && 操作符) 实现细节: - regexp_replace 把"15 B;24 B"非数字非分号字符替换为 ; → "15;24" - string_to_array + array_remove '' 去空元素(关键:两 array 都有 '' 时 '' = '' 误返 true) - PG && 任一元素相同即 overlap 收益例子: - 罗国标 K04 14;15 + actual endodontic 36 → tooth overlap false → 正确召回 14;15 - 之前 patient/category 级会被误排除 向下兼容:48.7% actual 带牙位 → 这部分走 tooth-level 精筛; 其余 52% actual 无牙位(全口治疗)→ 走 ② 分支,跟现状一致(全口覆盖)。 不需要重导(SQL 改动,数据不动);下次 recompute-plans 立刻生效。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>luoqi committed
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| pac-service | Loading commit data... | |
| pac-web | Loading commit data... |