-
Notifications
You must be signed in to change notification settings - Fork 1
Herd Recordings
Dan edited this page Feb 7, 2021
·
2 revisions
Overview of each sampling date including total animals and animals in milk. Also contains any bulk sample results.
import { herdRecordings, openDatastream } from 'nmr-datastream';
(async () => {
try {
const datastream = await openDatastream('./path/to/your/datastream');
console.log(herdRecordings(datastream));
} catch (e) {
console.error(e);
}
})();
Returns an array of objects containing the following information:
{
date: Date,
totalAnimals: number,
cowsInMilk: number,
cowsIn3xMilk: number,
totalWeightOfMilk: number, // 00000.0
totalWeightOfFat: number, // 000.0000
totalWeightOfProtein: number, // As above
totalWeightOfLactose: number, // As above
differenceReason: string | undefined, // Blank or one of the following: No Sample Taken, Yields Missing, Not received in lab, No Sample Taken, Spilt, Spoilt / Sour, Sediment
numberMissedWeights: number, // Number of animals not sampled
printEligible: boolean,
bulkYield: number, // 00000
bulkFatPercentage: number, // 00.00
bulkProteinPercentage: number, // As above
bulkLactosePercentage: number, // As above
herdProductionBase: number, // 000000
bulkSCC: number, // 000
}