正文
获取原文件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.