6.7.2.3 AnimalLink
6.7.2.3.1 Purpose¶
Records that two animal records are the same animal. The only automatic reason is an identical identifier after normalization, and incompatible identity evidence blocks the link. A link can be reverted.
6.7.2.3.2 Questions it answers¶
- Was this animal record merged into another one, and why?
- Which record survives?
- Has a merge been undone?
6.7.2.3.3 Fields¶
| Field | Type | Cardinality | Description |
|---|---|---|---|
id |
string (uuid) |
1..1 |
Key. |
survivor |
Animal | 1..1 |
|
other |
Animal | 1..1 |
|
reason |
enum | 1..1 |
Values: same_normalized_identifier.The only automatic merge: identifiers identical after normalization (e.g. IT020990691356 and 380020990691356). Compatible identities sharing a scheme-qualified identifier reuse/link the known Animal. Incompatible identity evidence blocks the link and raises a DataIssue (kind identity_conflict): different sex, birth dates that differ beyond their precision, different sire or dam identifiers (AnimalProfileEvidence), or sessions of both records at the same time on different devices or farms. e.g. Lely Ponte Vecchio: one official ID carried by two cows. |
status |
enum | 1..1 |
Values: active, reverted.Reverted = unmerge, e.g. after a normalization rule changes: the other animal and its evidence are restored and resolution is re-run. |
rule_set |
ReconciliationRuleSet | 1..1 |
|
revision |
RecordRevision | 1..1 |
Keep active/reverted decisions by system time; reversion cannot rewrite historical datasets. |
created_at |
datetime |
1..1 |
|
updated_at |
datetime |
1..1 |
6.7.2.3.4 Relationships¶
References
AnimalLink.survivor→ Animal (1..1)AnimalLink.other→ Animal (1..1)AnimalLink.rule_set→ ReconciliationRuleSet (1..1)
Uses types
6.7.2.3.5 Rules & constraints¶
- Two Animal records found to be the same animal. Like FHIR Patient.link (replaced-by).
- Merges never move or delete rows: readers follow survivor, and follow at most one link: when a survivor is itself merged into C, every active link that points to it is re-pointed to C in a new revision.
- Reverting a link restores the other animal and re-runs resolution for both.