跳到正文

D002 数据结构与关联关系分析

分析医疗数据的字段、记录单位、主键质量与跨表关联,记录数据缺口及连接条件,为后续处理提供结构依据。

个人 Skill知识加工11 个文件浏览次数 0
开始使用

下载前阅读 SKILL.md 中的使用条件,并确认所用工具支持对应能力。

输入资料
Required: D001 source_manifest.json the exact local source file/directory that D001 inventoried Preferred invocation:D002 must verify that every profiled file resolves inside the declared input boundary.Supported determi… 阅读本节完整说明
交付内容
Always produce: schema_linkage_profile.json schema_linkage_report.md linkage_edges.csv Prefer:./runs/haonan-d002/<package-id>/The machine-readable contract is defined in assets/schema_linkage_profile.schema.json and expl… 阅读本节完整说明
  1. 获取完整包,保留配套文件的目录结构。
  2. 按照原文准备所需工具、依赖与输入资料。
  3. 阅读对应使用步骤与输入输出说明,在自己的环境中验证结果。

使用提示摘自原文,配套文件保留来源版本;实际运行条件以各包说明为准。

正文

获取原文件

references/linkage-policy.md

Identifier roles

Patient/person

Examples: patient_id, person_id, subject_id, mrn, 病案号, 住院号 only when used as patient identity rather than encounter identity.

Encounter/visit

Examples: encounter_id, visit_id, visit_occurrence_id, admission_id, hadm_id, 就诊号.

Specimen/order

Examples: specimen_id, accession_id, order_id, request_id, 标本号, 申请单号, 医嘱id.

Generic record key

Examples: id, record_id, result_id, event_id, line_id, UUID-like field names.

Do not trust names alone

Two tables both containing patient_id do not prove they use the same identifier namespace. D002 must compare tokenized values and report coverage.

Parent candidates

A table may be a parent candidate when:

  • the role field is effectively unique on that table
  • another table reuses the same namespace with repeated values
  • overlap/coverage is high enough to support the direction

Patient and encounter domain knowledge may break ties, but must not override contradictory observed structure.

Composite keys

Only search small combinations among plausible identifier/code columns. Common healthcare patterns include:

  • patient + encounter
  • accession/specimen + analyte/test code
  • encounter + order line
  • order + result sequence

Do not invent composite keys just to make uniqueness reach 100%.

Orphans

An orphan is a child-side identifier not found in the inferred parent candidate among the profiled values. If profiling is partial, report orphan counts as observed/sample-level and mark uncertainty.

Grain

Grain is a hypothesis. Key structure can raise or lower confidence but cannot by itself prove clinical meaning.

CONTACT HAONAN

联系haonan

医疗 AI · 产品与独立开发

刘浩南

关注医疗 AI 从 demo 到真实落地,聚焦产品化、商业化与院内工作流效率提升。

12年医疗产研经验,大湾区头部医疗AI公司前产品总监,独立开发者

医疗 AI 产品化医疗 AI 商业化院内工作流效率
刘浩南的微信联系二维码
微信扫一扫,联系 haonan