HerdView

- a PC-program for interactive analysis of reproduction and health in dairy herds.

Iver Thysen (iver@thysen.dk) & Carsten Enevoldsen (ce@life.ku.dk)

[Home] [Introduction] [Download Program and Demo Files] [A Veterinarian's User's Guide] [Creating definition and data files]


HerdView File Specification

Event data file

HerdView expects as input an event data file (default name *.HVD), an ASCII text file with separate lines for the herd, the cows and the events. The type of each line is identified by the first character, which must be one of the letters "H", "C" or "E". The information on the lines is:

H: Herd Id.
Text string of max. length 60, which will be used as a header on screen views and hardcopies.

C: Cow Id.
Text string of max. length 12. If the cow identification include blanks it must be enclosed in qoutes.
E: Event
Date
Format yymmdd. The date is validated and records with invalid dates are ignored. Dates before January 1 1990 are invalid. Dates from January 1 2000 are valid.
Event code
Numerical codes in the range 3..255, separated by one or more blanks.
Parity and Group
Optionally, the values of two internal HerdView variables can be added to the event data records. Variable values are given as
  • Parity: P=c
  • Group: G=c
where c is an alfa-numeric character.
The variable values may also be defined without an event by an event record with zero for the event code.

Lines not starting with "H", "C" or "E" are skipped. Only one herd can be read from a single file; a second "H" line will cause the rest of the file to be skipped.

[Top of page]

Event definition file

Event codes and symbols are defined by an event definition file (default name *.DEF), which is an ASCII text file with each line defining an event in the event data file. Each line has 3 required data fields and a number of optional data fields, all separated by blanks. The required data fields are:
Event code
The code number (range 1..255) by which the event is identified in the event data file.
Symbol
The ASCII character symbolizing the event in the views produced by HerdView. The character's decimal number is given (Notice: not all characters are printable; characters 0-31 will be replaced by blanks in prints).
Label
A text string of max length 15 describing the event. If the string inludes blanks, it must enclosed in quotes.

Event codes 0, 1 and 2 are reserved for internal use in HerdView and are skipped from the event data file. The meaning of these codes are

The symbols and labels for codes 1 and 2 must be defined in the event definition file.

The optional data fields are used to associate certain events with a special meaning which is used by HerdView in preparing event views and statistics. This is provided for by keywords placed after the required datafields and separated with one or more blanks. The keywords and their meaning are:

Begin
Beginning of the "lifeline" in event views
End
End of the "lifeline" in event views
Initserv
Beginning of the service period, used for computing reproduction rates.
Termserv
End of the service period, used for computing reproduction rates.
Calving
Calving, used to delete posssible service period symbols 40 weeks backwards when a "PdPlus" event (see below) had not occurred.
Service
Service, used for computing reproduction rates.
Pdplus
Positive pregnancy diagnosis, used for computing reproduction rates. The symbol for the "Pdplus" event is placed in the week for the previous "Service" event, which is covered.
Noinspd
A positive pregnancy diagnosis without a corresponding service. Is used instead of the "Pdplus" if a "Service" event is not found after the latest calving.
Default
Default code and symbol for event codes not defined in EVENT.DEF. If "Default" is not given as keyword, records with event codes not defined in EVENT.DEF will be ignored.
Replace=n
The event code is replaced with event code n when read by HerdView. Used to group events.
Alias=m
A second code m is associated with the event. Used when one event is to be counted in two groupings. If an event and its alias event both occur in the same week, only the symbol for the event will be shown, and none of the events will be shown in the subsequent week. For example, specifying a "Service" event as an alias to a "Pdplus" event ensures that services are covered by positive PD's but the service event is counted as such.

Page by Iver Thysen iver@thysen.dk  Updated 17 October 2011