Assignment of Reproduction Events to Herds
TO DETERMINE IF AN EVENT ALREADY
EXISTS:
All events for the cow-calving are checked for equal event date, service
sire key, and event types (A and N event types are considered equal). If the
date type and seq num are the same, no update is required. Else update the
event only if the input processing date is later than the existing processing
date.
NOTE: If the herds are not equal, update is ignored.
TO DETERMINE WHICH HERD TO ADD AN
EVENT:
- Create a table of all information for the calving
- TD dates
- RE dates
- HiDIMs; ignoring HiDIM = 0
- Term code 2-8 (absolute end of herd)
- Determine Maximum and Certainty Limits for each herd
- Certainty Limits are the minimum and maximum dates for each herd
group.
- Maximum Limits are previous herd's highest certainty date + 1
and the next herd's lowest certainty date - 1 with the exception of absolute
termination of a herd.
- If event date is within the Maximum Limits of existing herd, add
event to herd.
- Else if event date is within the Certainty Limits of another herd,
add event to another herd.
- Else if input herd does not previously exist, add event to a new
cow-calving-herd row.
- Else add event to nearest herd, unless herd was absolutely
terminated and event date is incorrect. In this case, generate a 8Ce error and
drop event. If herd D in the example had term code of 2, then event dates
2003-04-14 and 2003-04-15 would have been dropped.