Commit cca5ef37 by luoqi

docs(persona): 16 标签(删 do_not_contact_status)+ lifecycle 咨询 gate + 咨询主体/treatment_intent follow-up

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 539dbcf2
# 画像层 v2(实现版)
> **版本**:W7 · 2026-06 · 反映**已实现的 17 个画像标签** + 架构 + 算法审查发现。
> **版本**:W7 · 2026-06 · 反映**已实现的 16 个画像标签** + 架构 + 算法审查发现。
> **单一真理源**:每个标签的 标签值/数据源/释义/算法/时间语义 在代码注册表
> [`packages/types/src/persona-feature-specs.ts`](../../packages/types/src/persona-feature-specs.ts)(`PERSONA_FEATURE_SPECS`);
> extractor 在 `apps/pac-service/src/modules/persona/features/*.feature.ts`。本文是**人读总览 + 决策记录**,不复制每字段。
......@@ -26,7 +26,7 @@
## 三、4 种数据范式(标签从哪来)
| 范式 | 说明 | 标签 | 部署成本 |
|---|---|---|---|
| **① 已摄入直接算** | 读现有 fact / 主档 | rfm / lifecycle_stage / treatment_history / time_preference / age_bracket / gender / do_not_contact | 仅 `--force` 重算 |
| **① 已摄入直接算** | 读现有 fact / 主档 | rfm / lifecycle_stage / treatment_history / time_preference / age_bracket / gender | 仅 `--force` 重算 |
| **② 副表立柱新摄** | fact_client_out 字段 → `patient_profiles` 新列(enum_mapping 归一,多宿主标准) | acquisition_channel / referral_champion | migration + 重摄 |
| **③ fact.content 新字段** | 结算字段 → `payment_record.content`(JSONB,无迁移) | entitlement_status(卡券名)/ discount_anchor(折扣额) | 重摄 |
| **④ 衍生表 / ctx 加载** | 复用 PAC 已有派生数据,注入 persona ctx | family_structure(PatientRelation)/ special_attention(appointmentsAll) | 仅 `--force` |
......@@ -40,11 +40,11 @@
- **extractor** 实现在 `features/*.feature.ts`,由 `FeatureRegistry` 收集,`PersonaService.recompute` 遍历。
- **重算**:`pnpm recompute-persona -- --host=jvs-dw --force`。⚠️ `--force` 必需 —— 算法/特征变更但数据没变时,水位幂等闸会全 noop;`--force` 跳过闸强制重算(部署也用)。
## 六、17 标签总览(本地 928 样本)
## 六、16 标签总览(本地 928 样本)
| 标签 | 类 | 标签值 | 数据源 | 时间语义 | 覆盖 |
|---|---|---|---|---|---|
| `rfm` 价值分群 | B | 8 分群(重要价值..低活跃) | 付款/就诊 fact | mixed | 928 |
| `lifecycle_stage` 生命周期 | B | 潜客/新客/成长/成熟/待激活/沉睡/流失 | 付款/就诊/预约 fact(自算) | window+trend | 928 |
| `lifecycle_stage` 生命周期 | B | 潜客/新客/成长/成熟/待激活/沉睡/流失 | 付款/就诊/预约/咨询 fact(自算) | window+trend | 928 |
| `treatment_history` 治疗史 | C | 种植/正畸/修复/牙周(多标签) | treatment_record.category | lifetime | 773 |
| `potential_treatment` 潜在治疗 | C | 种植/正畸/早矫/修复/牙周/根管/拔牙/补牙(多) | **复用召回 gap 核心**(clinical-gap) | snapshot | 771 |
| `urgency_level` 急迫等级 | C | 紧急/高/中/低(单标签,取最大) | 潜在治疗 × 末诊(v1 仅此路径) | snapshot | 771 |
......@@ -59,7 +59,7 @@
| `referral_champion` 转介绍达人 | B | 家庭型/社交型 | recommend_num/amount(副表)+ 关系 | snapshot | 26 |
| `treatment_sensitivity` 治疗敏感 | D | 看牙恐惧/晕针/晕血/密闭恐惧(多) | EMR 既往史关键词(精炼排假阳) | lifetime | 2(全量~177) |
| `contraindication` 禁忌标签 | D | 种植/正畸/麻醉/手术禁忌(v1 仅种植年龄≤18) | patient.birthDate(余 Layer C) | snapshot | 167 |
| `do_not_contact_status` 勿扰 | — | 可触达/勿扰 | profile + 投诉 | snapshot | 928 |
| ~~`do_not_contact_status` 勿扰~~ | — | (已删,W7末)免打扰并入 special_attention;合规闸召回读 profile 原始列 | — | — |
> 多标签(允许并列):treatment_history / time_preference / entitlement_status / special_attention / treatment_sensitivity / contraindication / potential_treatment。
> 稀疏(依赖数据完整性,全量更准):family_structure / referral_champion(关系边稀疏)、special_attention 免打扰/不可等候、treatment_sensitivity(本地样本无数据,全量出)。
......@@ -86,6 +86,8 @@
- **潜在治疗**:① 非已丢单(sales_chance)PAC 未摄入 → 现未排丢单;② 召回 missing_tooth 补"种植 age>18"门(与禁忌/潜在治疗对齐);③ Step3 主诉意愿加分(排序)留消费方。
- **急迫等级**:v1 仅"潜在治疗路径";【已治疗复查路径】(种植/根管/保持器/牙周维护/充填 复查超期)待召回实现复查 scenario 后补(占急迫 spec 的一半口径)。美学/预防→低 暂不触发(8 标签不含)。
- **gap 核心收敛**:召回与潜在治疗已共用 clinical-gap;治疗链 chain-composer 的同类牙位逻辑后续也可并入。
- **dnc 删除善后**(W7末):已故/投诉信号随 do_not_contact_status 删除暂从画像移除 —— 后续补(投诉=未来 complaint_history 特征;投诉数据当前 PAC 缺);合规闸召回不受影响(读 profile 原始列)。
- **咨询主体已摄入**(consultation_record,5993 facts/5 试点,intents=患者意向):喂 **treatment_intent 特征(未做)**——患者咨询想做 X 但没做 = 高意愿,与 potential_treatment(诊断维度)互补。fact_consult_out 链路见 §九 / commit。
- **Layer C(LLM 抽取)层标签** ⭐:禁忌标签(糖尿病控制/过敏/抗凝/妊娠… 需读既往史+否定处理+控制状态+时效窗)、沟通偏好/治疗意向/家庭社交关系等。contraindication / treatment_sensitivity 已留 data 多标签位,Layer C 就绪后并入。
- **treatment_sensitivity 否定**:晕针等加否定感知(否认晕针),量级小,随 Layer C 一起规整。
- **discount_anchor 口径**:近免费(>90%off)comp/全保 是否算锚点(现 ≥¥500+ratio>0,未加 floor);¥500 阈值可调。
......
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