一、时间/金额实证(2026-07-20,契约文档同步): - 金额=元(洁治单价均值 ¥310/客单 ¥1,730 双证);MySQL datetime=北京墙钟(_gmt_ 命名惯例误导) -⚠ ️ Mongo Date=北京墙钟伪装 UTC(clinicTime/createdGmtAt 小时分布双峰直读=营业时段;按真 UTC 解释一半病历落深夜)→ export.sh Date 改直读墙钟输出 naive 字符串;EMR 链 35.6 万 fact 清层重灌校正(-8h),修后小时分布恢复营业双峰。契约文档明令宿主 push 勿 toISOString 带 Z 二、官方字典(friday-saas 源码考古,待确认清单清零): - contacts.relationship = PhoneRelationshipEnum(1本人…9其他)→ patient.yaml 解码, preferences.contactPhone 带 relationship 标签(mother/father…) - referee_relationship = RecommendRelationshipEnum 17 码;reverseValue+年龄差数据双证 语义方向=customer 是 referee 的 X → patient_relation.yaml 按逆关系重写(码8 其他亲属 纠正 friend→other;新增 5/6/11/12/13/15/16 映射;码3 按对方性别拆 father/mother)。 关系表清层重灌:friend 3,511→541(纯码7),官方映射干净落地 - settlement status 全 9 值:实体注释 7=流程结束/8=欠款补缴克隆单(savePatientSettlementQk 证实 receivable 原样复制→入消费必双计)→ 现行不收 0/2/5/6/7/8 全部获官方背书 - treat=本次治疗/dispose=处置(EmrInfoResDto 注释);预约 status 7=到诊患者变更 三、患者主档 push(此前 form A 仅支持 fact 资源): - patient-upsert.util:upsert 数据构造抽纯函数,full(cold-import 历史语义,分毫不变)/ partial(push 单表:未提供字段不进 update 集合、phone 永不合成假号)双语义 —— 解决 push 单表时 contacts lookup 缺席导致存量真号被假号覆盖的根因 - ingestRawTables 路由 upsert 资源(patient partial/patient_relation/patient_return_visit); 纯主档推送不产 txn 不触发重算(注释明示) - 测试 8/8(partial 不覆盖/无清空语义/preferences 透传);E2E 冒烟:push 单行改名, 存量 phone 15725591111 原样保留 ✓。契约文档待确认清单清零 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| canonical-fact-layer.spec.ts | Loading commit data... | |
| dispatcher-emits.spec.ts | Loading commit data... | |
| fact-writer-temporal-supersede.spec.ts | Loading commit data... | |
| patient-upsert-partial.spec.ts | Loading commit data... | |
| plan-engine-batch.spec.ts | Loading commit data... | |
| plan-engine-snooze-anchor.spec.ts | Loading commit data... | |
| plan-engine-stale-close.spec.ts | Loading commit data... | |
| push-source-unit-dedup.spec.ts | Loading commit data... | |
| reason-live-days.spec.ts | Loading commit data... | |
| recall-suppression.spec.ts | Loading commit data... | |
| script-facts.spec.ts | Loading commit data... | |
| transaction-synthesizer-occurred-at.spec.ts | Loading commit data... | |
| transforms.spec.ts | Loading commit data... | |
| treatment-keyword-classifier.spec.ts | Loading commit data... |