Linkage resolution strategy
Based on linkage_analysis.csv and profiling report section 4.
DIRECT_CARECASE
- Use
CareCaseCaseIdon contact when valid incarecase_cases(referential integrity pass). - Populate
FactCareCase.SourceContactKeyfromSourceContactIdwhen present. - Orphan IDs (47): load contact fact with
orphan_case_id_flag=1; do not join to case.
DIRECT_LEGENDARY
- Use
LegendaryCareReferralId/LegendaryCareEncounterIdon contact when populated. - Facts load independently; optional link via
SourceCareCallContactIdon referral when present.
INFERRED_MATCH
Do not auto-promote to direct FK in facts.
- Staging identifies candidate pairs: same
PatientPseudoId, caseOpenedDateTimewithin ±24h ofContactDateTime, no direct IDs. - Insert into
BridgeCareCallInferredCasewithinference_rule_id,confidence_score(demo: fixed 0.75). - Mart measures: report direct and inferred linkage counts separately.
AMBIGUOUS
- Parse
AmbiguousMatchIds(pipe-delimited) intoBridgeCareCallReferralCandidate— one row per candidate. - No default winner; reporting uses primary candidate only after human mapping table (future) or highest
ReferralDateTimeproximity (documented assumption).
CALLBACK_DUPLICATE
- Preserve
CallbackOfContactIdonFactCareCallContact. - Dedup policy for marts: count all contacts vs count distinct patient-day — human decision (see review pack).
NO_CASE
- No bridge rows; contact fact only.
CareCase without SourceContactId
- Load
FactCareCasewith null contact key. - Set
is_extract_inclusion_casefrom staging. - Operational IUCS conversion metrics exclude these unless reviewer approves inclusion rule.