Skip to content

6.3.2.8 ExternalIdentifier

6.3.2.8.1 Purpose

An identifier given to an animal or group outside our system: an official national ID, a farm number, an id from management software, an alias such as a bull's artificial insemination (AI) code, or a value we cannot classify. Values are brought to a standard form by versioned rules and carry a validity period, because farms and software reuse numbers.

6.3.2.8.2 Questions it answers

  • Which animal carries this identifier, at this time and on this farm?
  • How did the value we received become the stored value?
  • Which earlier identifier of the same type did this one replace?
  • Which aliases does a bull have?

6.3.2.8.3 Fields

Field Type Cardinality Description
id string (uuid) 1..1 Key.
value string 1..1 The external identifier, normalized (see ExternalIdentifier.normalization_rule). The value as sent stays in the raw file.
Official identifiers follow a versioned issuing scheme per nation (NationalIdentifier.identification_scheme), not one universal format.
Strip prefixes/separators or pad zeros only under documented rules for that scheme, never by similarity.
e.g. EU bovine scheme (Reg. 2017/949): ISO alpha-2 country + 12 digits; the numeric country code 380 is rewritten to IT, so 380020990691356 = IT020990691356.
organization Organization 0..1 Empty for global identifiers (official IDs, bull AI codes and aliases), which are the same for every Organization.
namespace string 1..1 Chosen by our system.
Local identifiers: (organization, namespace, value, type) unique only over overlapping validity periods.
period Period 1..1 valid_from: when the third party issued the identifier; valid_until: when it was invalidated.
previous_same_type_identifier ExternalIdentifier 0..1 Unique.
Must have the same subtype, Organization and namespace.
normalization_rule CodedValue 1..1 Versioned rule; identifies the complete ordered transformation, not just the last operation.
How the sent value became the stored value. A value that is not a valid official ID is not dropped: it is kept as an IntegrationIdentifier or UnknownIdentifier of the feed, so the animal stays identifiable there, and a low DataIssue is raised.
Only values that identify nothing (empty, "0") are skipped (invalid_identifier).
Farm numbers and software ids (FarmIdentifier, IntegrationIdentifier) are reused by farms: their period is required to resolve them.
system_version SystemVersion 1..1
created_at datetime 1..1
updated_at datetime 1..1

6.3.2.8.4 Subtypes

Discriminator type: every ExternalIdentifier is exactly one of the subtypes below (disjoint and complete).

NationalIdentifier

Field Type Cardinality Description
nation Nation 1..1
identification_scheme CodedValue 1..1 The nation's scheme fixes the length and the normalisation: a fixed-length scheme (Italy, 12 digits) rejects other lengths; a variable-length scheme (Germany 10, France 10, Belgium 9, Netherlands 9–10) is stored left-padded with zeros to 12 digits, the ISO 11784 national-code width, so every source compares equal.
The country must be an ISO 3166-1 code with a registered scheme; anything else is an UnknownIdentifier.
  • (identification_scheme, nation, value) resolves globally, independently of the current farm.
  • Reuse the known Animal when evidence is compatible; duplicate internal identities may be linked reversibly.
  • Conflicting biological identities sharing an identifier raise DataIssue, not an automatic merge.

FarmIdentifier

Field Type Cardinality Description
farm Farm 1..1

IntegrationIdentifier

Field Type Cardinality Description
source_channel SourceChannel 1..1 Integration identifiers are assigned by the channel (e.g. the management software), not by an origin.

UnknownIdentifier

Field Type Cardinality Description
unknown_note string 0..1
  • e.g. a value in the official-ID column that is not an official ID (Lely "DC 140623000550": 16 adult cows on one farm).

AliasIdentifier

Other names of the same animal, mainly bulls: AI codes, herdbook names, abbreviations.

Field Type Cardinality Description
scheme enum 1..1 Values: ai_code, naab_code, interbull_id, herdbook_number, herdbook_name, short_name, other.
interbull_id: breed + country + sex + 12 digits (e.g. HOLUSAM000123456789; sources also write HO840…); herdbook_number: a breed association's registration number (e.g. US Holstein 8 digits). Neither is a national ID.
learned_from enum 1..1 Values: source, confirmed_pairs, deterministic_rule. Default: source.
confirmed_pairs: two feeds used these two names for the same service many times (e.g. ALTATHUN = THUNDERBIRD); deterministic_rule: e.g. DairyComp truncates names to 8 characters (REFLECTO = REFLECTOR).

ElectronicIdentifier

A transponder the animal carries: the 15-digit ISO 11784/11785 code of an electronic ear tag or bolus, or a vendor tag number. It is the key that robots, parlours, collars and the registry share, so it resolves animals across feeds of the same farm.

Field Type Cardinality Description
scheme enum 1..1 Values: iso11784, vendor.
Iso11784: 15 digits, country or manufacturer code (3) + national code (12); when the first three digits are a country code (e.g. 380) the last 12 are the national identifier without the ISO alpha-2 prefix. vendor: a responder or tag number of one system (Lely 7-digit responder, SCR 8-digit tag, DelPro short transponder).
vendor string 0..1 Only for scheme = vendor, e.g. lely, scr.
  • An ISO transponder is global: organization is empty. A vendor tag is local to the farm: organization is set.
  • A transponder can be reassigned to another animal (a collar changes cow): the period says when it was worn.

6.3.2.8.5 Relationships

References

Referenced by

Uses types

Period, CodedValue, SystemVersion

Subtypes

6.3.2.8.6 Rules & constraints

  • An ExternalIdentifier is held by at most one Animal or AnimalGroup (IdentifiersValues).
  • Superseded identifiers are reachable through previous_same_type_identifier.