-
Notifications
You must be signed in to change notification settings - Fork 1
Herd Information
Dan edited this page Feb 7, 2021
·
2 revisions
Basic herd information including farm address, herd prefix and number. Mainly information relevant to the milk recording company.
import { herdInformation, openDatastream } from 'nmr-datastream';
(async () => {
try {
const datastream = await openDatastream('./path/to/your/datastream');
console.log(herdInformation(datastream));
} catch (e) {
console.error(e);
}
})();
Returns an object containing the following
Most are self explanatory - some are no longer in use but values are there should they be applicable to your use case.
See pages 7 / 8 on the Datastream Spec PDF should you need to find out more.
{
address: {
line1: string,
line2: string,
line3: string,
line4: string,
line5: string,
county: string,
postcode: string,
}
herdPrefix: string,
pedigreeBreed: string,
startedRecording: Date | null,
nmrInformation: {
nmrCounty: string,
nmrOffice: string,
scheme: string | undefined,
weightingSequence: string,
lastWeightingMonth: number,
herdMark: string,
serviceType: string,
progenyTest: string,
lifeTimeYieldMember: string,
cowCardPrinted: string,
calfCropIndex: string,
herdWatchMember: string,
cellCountMember: string,
}
}